[PATCH] init: handle kexec clean reboot

Rob Landley rob at landley.net
Thu May 23 03:09:36 UTC 2013


On 05/22/2013 11:42:30 AM, Denys Vlasenko wrote:
> On Mon, May 20, 2013 at 8:56 AM, Harald Becker <ralda at gmx.de> wrote:
> >>> Busybox init has a restart action. If
> >>> this action is set to a script it is invoked after normal
> >>> shutdown processing. The script may do whatever action may be
> >>> required or optionally restart the init process.
> >>
> >>That seems a little bit clunky; we may not always want the
> >>restart action to be a kexec (but just a normal reboot). In this
> >>case, would we need to be dynamically reconfiguring the restart
> >>action?
> >
> > We have already three types of shutdown: halt, reboot and
> > poweroff. All three are handled by the same restart action and
> > need what you call "dynamic reconfiguration". You may just pass
> > required information via shared memory. In most cases I know, it
> > is handled this way.
> 
> I think the entire "reboot/shutdown through init" idea
> is not too clever invention in general.
> 
> The operation of shutting down the system
> is not intrinsically tied to init.

It was designed that wasy because you have to tell init to stop  
respawning services. (You've always been able to do reboot -f yourself  
if you don't actually care.)

Rob


More information about the busybox mailing list