Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cmcl2!yale!think.com!spool.mu.edu!uunet!zephyr.ens.tek.com!tektronix!sequent!fenk From: fenk@sequent.UUCP (John Fenk) Newsgroups: comp.unix.questions Subject: Re: Running init not from console? Message-ID: <52274@sequent.UUCP> Date: 4 Feb 91 20:34:48 GMT References: <1991Feb1.071518.6219@apt.bungi.com> Reply-To: fenk@crg1.UUCP (John Fenk) Distribution: usa Organization: Sequent Computer Systems, Inc Lines: 32 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? There have been several suggestions regarding this question. Someone suggested using shutdown. Some systems require shutdown to be run from the console. Someone else suggested using the haltsys command. I would not suggest using haltsys (on the systems that have it) except in an emergency. On the systems that I am familiar with haltsys does not unmount filesystems and do other cleanups before shutting down. I suggest: /etc/init 0