Running init not from console?

Gunsul prg at mgweed.UUCP
Sat Feb 2 10:11:57 AEST 1991


In article <1991Feb1.071518.6219 at apt.bungi.com>, brian at apt.bungi.com (Brian Litzinger) writes:
< I have this wonderful Elgar backup power supply that can tell
< my UNIX System (ISC 2.0.2 System V.3.2) that the power has
< gone out.
< 
< So I'd like some daemon to do an '/etc/init 0' when this happens.
< 
< I've written a daemon called 'pwatchd' which does just this when
< it is sure the power is out.  However, 'init' just says:
< 
<     init must be run from the console
< 
< So what do I have to do to get init to do what I want rather
< than what it thinks is best?
< 
< Help!  Thanks in advance.
< 
< -brian
< brian at apt.bungi.com

We have a 'C' program here that will monitor the power and calculate
if the computer should shut down.  It does a 'system' call when it's
ready to quit.  You might try putting this in your (I assume!) shell script..

	cd /; /etc/shutdown -y -g10 -i0

Phil



More information about the Comp.unix.questions mailing list