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

Ian Latter Ian.Latter at mq.edu.au
Fri May 14 00:20:12 UTC 2004


I guess I went the other way ... and this is getting OT .. I wanted a 
single control system for the whole environment, as if it were 
embedded.  This allowed a single point of everything;

   - environment configuration
   - network configuration
   - applications launched by features selected by a user some place
   - etc.

On Topic tho, I followed sysvinit's notion of "kill 1 and I'll shutdown
the box" ... seemed the path of least surprise.  Sysvinit's respawn
appears to be controlled by a linked list that carries process flags ..
this allows it to manage the shutdown process correctly ... some-
thing that I didn't bother to implement (no point in a gentle shutdown
if your software is all on ROM).

This, too, allows a ctrl-alt-del trap at init to gracefully terminate the
core functionality before it roughly shuts off the power .. allows
acpid to run a reboot on power events, etc ..  just provides more 
control.



----- Original Message -----
>From: "Denis Vlasenko" <vda at port.imtp.ilyichevsk.odessa.ua>
>To: "Ian Latter" <Ian.Latter at mq.edu.au>, "Kevin P. Fleming" 
<kpfleming at backtobasicsmgmt.com>
>Subject:  Re: [BusyBox] how to get "reboot" to work when using "minit"??
>Date: Thu, 13 May 2004 23:09:27 +0300
>
> 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
> 
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox
> 

--
Ian Latter
Internet and Networking Security Officer
Macquarie University




More information about the busybox mailing list