Dienstag, 17. Juli 2012

Tell the users

Sometimes i really hate it. You tell the people that you will poweroff a system for maintainance and if you log in some minuits before you see all users are doing something on this system, so what to do?

First of all tell the users to logout, these can be done by a simple wall message. wall will send an message to all logged in users, so create a message file

cat message.txt
System will switch off on 7:30 UTC

and do a

wall message.txt

now all logged in users will see this message on their screen.
After that i will do an


which will shutdown the system autmatically after "some minuits" and will repeat posting the shutdown every minuite during the last 5 minuits.

Thats it