Running init not from console?
uunet!bria!mike
uunet!bria!mike
Sun Feb 3 12:05:20 AEST 1991
In an article, apt.bungi.com!brian (Brian Litzinger) writes:
>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?
You change runlevel by sending an appropriate signal to the init process,
not by invoking another one. The "appropriate" signal can vary from
system to system, so you'll need to check out your manual pages on INIT
to proceed along this path. However, why not simply do something like
this:
sync; sleep 2; /etc/haltsys
Some may argue that it's crude, but I rather like it.
--
Michael Stefanik | Opinions stated are not even my own.
Systems Engineer, Briareus Corporation | UUCP: ...!uunet!bria!mike
-------------------------------------------------------------------------------
technoignorami (tek'no-ig'no-ram`i) a group of individuals that are constantly
found to be saying things like "Well, it works on my DOS machine ..."
More information about the Comp.unix.questions
mailing list