[BusyBox] Reboot not working?

Erik Andersen andersen at codepoet.org
Mon Nov 12 00:01:07 UTC 2001


On Sun Nov 11, 2001 at 03:44:33PM -0500, Adam Slattery wrote:
> 
> No, sysvinit does not make the syscall itself. Look at the source code to 
> halt.c and init.c (from sysvinit).
> 
> A sysvinit halt/poweroff goes like this: init changes to runlevel 0 and
> runs the appropriate script(s).  The last command executed is 'halt -f' or
> 'poweroff -f', which is what executes the syscall.  When 'halt -f' is run,
> it stops init (SIGTSTP), then makes a syscall to actually halt the system.
> The same goes for poweroff and reboot (which are links to halt), but they
> use differant flags to the reboot syscall.

/me rereads sysvinit

Yup, you are right.  Guess its been too long since I last looked
at it.  That is good though, since that makes my earlier comment
all the more correct -- we should move the graceful shutdown and
reboot code out of init.c and into libbb, and then have have
init.c, reboot.c, and halt.c all use the libbb routine to do a
graceful shutdown.

I'm willing to accept a patch to implement this,

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--





More information about the busybox mailing list