Sample Header Ad - 728x90

Print a message a given number of times, right after system boot (init) in a GUI-less system

1 vote
2 answers
133 views
I want that for a given number of system boots (say, 1 or 2 system boots), a message will appear. I will store the message somewhere, maybe in a variable: message='If you finished testing, make sure to remove the testing application.'!' ## Notes: - I use Ubuntu server 16.04 and aim for a solution for GUI-less systems. - The purpose of the code is to have a nice way to remind myself of a certain task, if, for some reason, I didn't recall that it is a good time to do it. - I assume I should store the variable somewhere "deeper" than RAM, maybe in a file I'll create for it, maybe another method. I'm not sure. - Cron isn't good because it's repetitive, and not for a given number of executions. - This is good in case you reboot / turn off / power outage --- you get a reminder for an important task. ## Clarification I tried to describe a case when a user turnes on the machine, and in the moment the primary prompt appears, along with it, will appear the message I mentioned.
Asked by Arcticooling (1 rep)
Dec 5, 2017, 03:11 AM
Last activity: Dec 5, 2017, 12:53 PM