logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: 36c1925742b1b6bdd0aaebad6522cb50c7e48175
parent 754d967b2994b0a093c572abc5e9c045c9e43d19
Author: Gábor Stefanik <netrolller.3d@gmail.com>
Date:   Fri, 12 Jan 2024 13:07:34 +0100

Fix panic due to after.sh prematurely quitting on shutdown

The sysrq shutdown trigger takes some time to fully shut down the system,
during which init is expected to continue running. Since after.sh is the
last step in our init, if it quits before shutdown is complete, Linux will
panic with "Attempted to kill init".

Add an infinite loop after shutdown is issued via sysrq to prevent this.

Diffstat:

Msteps/improve/after.sh1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/steps/improve/after.sh b/steps/improve/after.sh @@ -21,4 +21,5 @@ if [ "${CHROOT}" = False ]; then echo u > /proc/sysrq-trigger mount -o remount,ro / echo o > /proc/sysrq-trigger # power off + while true; do sleep 1; done fi