reboot from init script doesn't work with busybox-1.26.2

Rob Landley rob at landley.net
Wed Dec 27 18:34:20 UTC 2017


On 12/13/2017 11:50 AM, Ankur Tank wrote:
>>From Stakeoverflow I got redirected to below patch/commit
> https://git.busybox.net/busybox/commit/init/init.c?id=2bba9ad67a917de2624d427c8c107ce3e2d3d085
> 
> I got to know that reboots are not allowed during init.
> 
> However for our use case we need that.

Hmmm... maybe something like:

  if test
  then
    (sleep 5; reboot)&
    exit
  fi

So the reboot signal gets sent after the init script completes?

(If the init script doesn't complete while there's children, you could
try disown $(jobs -p) but I dunno what ash supports these days...)

Rob


More information about the busybox mailing list