[Tfug] How to allow the user to reboot?

jblais joe.blais at pti-instruments.com
Mon Nov 12 09:42:17 MST 2007


> >
> According to "man sudoers" the second item on the line is the
> computer name.
>
> Paul Scott
>

On Monday morning all these things seem more obvious!

It's just that the first 20 pages of "man sudoers" was a treaties on how to
obfuscate documentation of what could otherwise be a simple language.  I
kept on paging down until I saw some examples that looked like what I wanted
to do... anyway I figured out enough to make it work.  I'm not too worried
about users getting into things, because using the "sessions" thing, the
computer is 'dead' when the app finishes.  So I was trying to make the thing
shut down nicely instead of just pulling the plug if someone needs to move
the thing or shut it down for the weekend.  Now, if the user wants to exit
the app, I set an exit value that the script looks at and based on that, it
decides to shutdown.  Otherwise it's in an endless loop in case someting
barfs.

Thank you all for the help

Joe





More information about the tfug mailing list