[BusyBox] Reboot not working

boris at microtrader.com boris at microtrader.com
Sat Nov 10 12:25:04 UTC 2001


If the implimentation works flawlessly, then do it. :) I very much hope you add 
it before the next release.


On Thu Nov 08, 2001 at 02:15:14PM -0500, Scott Murray wrote:
> The reboot/halt applets in busybox normally rely on the init applet being
> turned on, as they just send a signal to it to trigger the reboot/halt.
> I'm attaching the patch I use against 0.60.1 to make reboot/halt call the
> syscall directly if the init applet is turned off.
> 
> Erik, is there any chance you could apply this, or tell me what you'd
> like cleaned up so that you'd consider applying it?

I suppose I can see the value in something like this, though it
will be awfully rude about how it shuts down the system.  I think
I would prefer to have a libb/bb_shutdown.c added and used when
busybox init is not enabled.  It would do something comparable to
what busybox init does to shutdown the system, i.e. send a
sigterm, sleep, then a sigkill, then a sleep, then call reboot or
poweroff or halt, then sleep forever (in case that fails).  And
having it print the appropriate message to the syslog (so the
kernel will spam the console) would be a good thing too...  With
some care, the shutdown routines could be ripped out of init and
used directly by reboot and friends when init is not enabled.  I
think that type of a solution would be the best.  Agreeable?





More information about the busybox mailing list