[Tfug] How to allow the user to reboot?
jblais
joe.blais at pti-instruments.com
Mon Nov 12 12:29:00 MST 2007
>
> WHy do you *want* the user to be able to do this?
> Presumably, if you don't trust the user with root
> privileges, you probably don't trust him/her to
> know when it's "appropriate" to shutdown, etc. (?)
>
> I would suggest letting the user set a flag somewhere
> (e.g., "touch /path/to/shutdownplease") and then have
> a job that watches for that flag and, WHEN IT IS
> APPROPRIATE, does an orderly shutdown.
>
> E.g., what happens if you let the user unilaterally
> do the shutdown and there is a backup job running,
> etc.?
>
> <shrug>
>
> My $0.02...
>
> --don
Well -- there are no backup scripts (so far), and I do want some kind of
orderly shutdown for the files -
How do you shut down a copy machine? I don't want it much more difficult
than that for the user.
The script that launches everything is looking for the proper exit value
from the app in order to do the shutdown. The script is running as user, so
I had to figure out how to get the script to do the shutdown.
Without the proper exit, it assumes a barf (throw(up) :-) and loops around
to restart the system.
joe
More information about the tfug
mailing list