[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building a single user Internet terminal / Done!



On  0, Shawn McMahon <smcmahon@eiv.com> wrote:
> begin  quoting what Karsten M. Self said on Mon, Apr 08, 2002 at 10:18:58AM -0700:
> > 
> > Not recommended.  If X quits abnormally, it will also restart.  What you
> > want:
> > 
> >    startx_command && shutdown -h now
> > 
> > ...which should only restart the system if X is exited normally.  If it
> > exits with a nonzero status, the system stays up.
> 
> Stays up at a shell prompt.  It's a kiosk, remember?
> 
> Shell prompt == bad.  Restart == less bad.

So...

while 0 ; do
	startx_command && shutdown -h now ;
done

will only shutdown when startx_command exits with error 0, otherwise
it'll restart.

Tom
-- 
Tom Cook
Information Technology Services, The University of Adelaide

"That you're not paranoid does not mean they're not out to get you."
	- Robert Waldner

Get my GPG public key: https://pinky.its.adelaide.edu.au/tom.cook-at-adelaide.edu.au

Attachment: pgpqTnT4FjrPh.pgp
Description: PGP signature


Reply to: