mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
busybox: add initial support for shutdown scripts
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
8070fdd44a
commit
18a4b9e055
@ -46,6 +46,8 @@
|
||||
progress "Starting Init Scripts"
|
||||
RET=0
|
||||
|
||||
RUNLEVEL="boot"
|
||||
|
||||
for script in `ls -1 /etc/init.d/*`; do
|
||||
if grep -q -e "^# runlevels:.*$MODE" $script; then
|
||||
. $script
|
||||
@ -53,3 +55,15 @@
|
||||
test $S_RET -ge $RET && RET=$S_RET
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$RUNLEVEL" -o $RUNLEVEL="boot" ]; then
|
||||
RUNLEVEL="poweroff"
|
||||
fi
|
||||
|
||||
for script in `ls -r1 /etc/init.d/*`; do
|
||||
if grep -q -e "^# runlevels:.*$MODE" $script; then
|
||||
. $script
|
||||
S_RET=$?
|
||||
test $S_RET -ge $RET && RET=$S_RET
|
||||
fi
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user