[BusyBox] how to get "reboot" to work when using "minit"??

Denis Vlasenko vda at port.imtp.ilyichevsk.odessa.ua
Thu May 13 20:09:27 UTC 2004


On Monday 10 May 2004 01:23, Ian Latter wrote:
> > How would it deal with it? There are lots of init programs out there,
> > and they use different means of communicating shutdown/reboot events
> > into the init process. Some use sockets, some use signals, etc. The BB
> > reboot applet can only deal with the init programs it's prepared to deal
> > with, and those are what it comes with and was compiled to support.
>
> I thought all average init's supported SIGTERM/SIGKILL type graceful
> terminations ... is this not true?  I haven't seen what minit's got ... but
> a small sig handler would be easy enough to add, if it doesn't come up to
> scratch.  Then you could make your reboot/shutdown a kill 1.

I handle it by _not_ informing init at all. Why should I?
I kill all daemons and remount all fs ro. Now I can reboot/shut down
without bothering about init.

If your init respawns daemons... well... you've got wrong init.
I spawn e.g. getties from svscan, not init. svscan is -TERM'able.

After I've done that, I realized that I don't need specially crafted init
at all, and replaced it with a shell script. Unexpectedly, nothing broke.
--
vda




More information about the busybox mailing list