Skip to content

Commit 36c1925

Browse files
committed
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.
1 parent 754d967 commit 36c1925

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

steps/improve/after.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ if [ "${CHROOT}" = False ]; then
2121
echo u > /proc/sysrq-trigger
2222
mount -o remount,ro /
2323
echo o > /proc/sysrq-trigger # power off
24+
while true; do sleep 1; done
2425
fi

0 commit comments

Comments
 (0)