Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucla-cs!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mgweed!prg From: prg@mgweed.UUCP (Gunsul) Newsgroups: comp.unix.questions Subject: Re: Running init not from console? Summary: Lights out! Message-ID: <8468@mgweed.UUCP> Date: 1 Feb 91 23:11:57 GMT References: <1991Feb1.071518.6219@apt.bungi.com> Distribution: usa Organization: AT&T Montgomery Works, Montgomery, IL Lines: 27 In article <1991Feb1.071518.6219@apt.bungi.com>, brian@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@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