commit 83f135c
chld
·
2026-09-07 14:51:26 +0000 UTC
parent 2582175
reboot: handle situation requests properly
1 files changed,
+7,
-1
M
reboot
M
reboot
+7,
-1
1@@ -1,9 +1,15 @@
2 #!/bin/sh
3 # handle end signals, bc userland doesnt understand us...
4
5+[ $1 = '-f' ] && {
6+ # still need to fall back to actual reboot after situation calls -f
7+ busybox ${0##*/} -f || { echo 'unknown signal'; exit 1; }
8+ exit
9+}
10+
11 case ${0##*/} in
12 poweroff) kill -TERM 1;;
13 reboot) kill -INT 1;;
14 halt) kill -USR1 1;;
15- *) echo 'unknown signal' ;;
16+ *) echo 'unknown signal'; exit 1 ;;
17 esac