On Tue, Dec 03, 2002 at 02:23:39PM +0800, Delz wrote:
> Hi,
> 
> Is there a program let's say I want to reboot the LTSP server and I want all
> my users to see a message popping on their screen that saids the server will
> reboot in 5 mins. Some sort of a warning message that will alert them, I
> want an easier way of alerting them so that it will eliminate myself from
> calling each user on the phone that the server will reboot in 5 mins. It
> gets a little tiring sometimes when I have to call all 55 users that the
> server will reboot.

First, it sound like you reboot too often. AFAIK only kernel updates
and hardware changes needs rebooting (after major software upgrades it
can be wise to reboot just to ensure that the system will reach a good
state after a reboot)

Secondly, why not reboot when no users are working, e.g. in the night,
or if that is not possible, when so few users as possible are working
(use who to see who's in). (This of, course requires that users
usually logs out when they are leaving or not using their terminals
for a long period of time).

Thirdly, I know of no program that will what you want without some
hacking. There is utility called xmessage, that could be scripted to
do something like this. xmessage must be run as the user who owns the
Xserver, so a script that runs as root and for every user does
something like this:

su $user -c xmessage -center -display $screen "will reboot in 5 minutes"

where $user and $screen are the first two columns of output of the who
command.

Happy hacking!

-- 
Hans Ekbrand (http://sociologi.cjb.net) <[EMAIL PROTECTED]>
GnuPG key: 1024D/7050614E (currently active subkey 03CE8884)
Fingerprint: 1408 C8D5 1E7D 4C9C C27E  014F 7C2C 872A 7050 614E
Key available at keyserver.kjsl.com   Encrypted emails prefered.

Attachment: msg09950/pgp00000.pgp
Description: PGP signature

Reply via email to