mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46: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"
|
progress "Starting Init Scripts"
|
||||||
RET=0
|
RET=0
|
||||||
|
|
||||||
|
RUNLEVEL="boot"
|
||||||
|
|
||||||
for script in `ls -1 /etc/init.d/*`; do
|
for script in `ls -1 /etc/init.d/*`; do
|
||||||
if grep -q -e "^# runlevels:.*$MODE" $script; then
|
if grep -q -e "^# runlevels:.*$MODE" $script; then
|
||||||
. $script
|
. $script
|
||||||
@ -53,3 +55,15 @@
|
|||||||
test $S_RET -ge $RET && RET=$S_RET
|
test $S_RET -ge $RET && RET=$S_RET
|
||||||
fi
|
fi
|
||||||
done
|
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