[PATCH] init: handle kexec clean reboot

Jeremy Kerr jk at ozlabs.org
Mon May 20 07:13:40 UTC 2013


Hi Harald,

> We have already three types of shutdown: halt, reboot and
> poweroff. All three are handled by the same restart action

Yep, and my original patch adds a forth to the same path the
halt/reboot/poweroff. This is slightly different to the restart path:
halt_reboot_pwoff() vs. restart_handler().

> and need what you call "dynamic reconfiguration".

No, I was worried that registering a restart handler would affect normal
reboot. But fortunately, that's not the case.


> You may just pass required information via shared memory.

You mean signals? Or am I looking at the wrong code?

I think I see what you're saying with the restart handler, but it seems
a little fragile: With the patch, we just to invoke `reboot -k`. Without
the patch, we need to ensure that inittab has the correct restart
handler, then SIGHUP init if inittab was modified, then SIGQUIT init to
do the actual shutdown & kexec.

Granted, systems that are expected to kexec can have inittab
pre-configured with a restart handler that calls `kexec -e`, but this
means that the kexec path depends on a specific configuration which
isn't obvious.

Cheers,


Jeremy


More information about the busybox mailing list