on Tue, Apr 09, 2002, Tom Cook ([EMAIL PROTECTED]) wrote:
> On  0, Shawn McMahon <[EMAIL PROTECTED]> 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.

Bingo.

-- 
Karsten M. Self <[email protected]>           http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   Support the EFF, they support you:  http://www.eff.org/

Attachment: pgpPxRr5zkWNM.pgp
Description: PGP signature

Reply via email to