From 798d6af30313890c48c04fe27c39b6a31a45b25f Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 12 Sep 2011 19:21:32 +0200 Subject: [PATCH] Revert "ConsoleKit: add proper shutdown support via init scripts" This reverts commit 626b77cf833c1cd6ef54c9c3a0fd8a813876067c. --- packages/mediacenter/xbmc/init.d/93_xbmc | 6 +++--- .../ConsoleKit/scripts/ck-system-restart | 18 +----------------- .../sysutils/ConsoleKit/scripts/ck-system-stop | 18 +----------------- packages/sysutils/busybox/scripts/init | 12 ++++++++++++ 4 files changed, 17 insertions(+), 37 deletions(-) diff --git a/packages/mediacenter/xbmc/init.d/93_xbmc b/packages/mediacenter/xbmc/init.d/93_xbmc index 4b95f893a6..99528740f7 100644 --- a/packages/mediacenter/xbmc/init.d/93_xbmc +++ b/packages/mediacenter/xbmc/init.d/93_xbmc @@ -68,13 +68,13 @@ case $RUNLEVEL in case "$RET" in 0) - RUNLEVEL="poweroff" + poweroff -f ;; 64) - RUNLEVEL="poweroff" + poweroff -f ;; 66) - RUNLEVEL="reboot" + reboot ;; 255) echo "Abnormal Exit. Exited with code $RET" diff --git a/packages/sysutils/ConsoleKit/scripts/ck-system-restart b/packages/sysutils/ConsoleKit/scripts/ck-system-restart index 160e50fac4..003c352270 100755 --- a/packages/sysutils/ConsoleKit/scripts/ck-system-restart +++ b/packages/sysutils/ConsoleKit/scripts/ck-system-restart @@ -20,20 +20,4 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -. /etc/profile - - progress "Reboot the syste" - RET=0 - - RUNLEVEL="reboot" - - 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 - - sync - reboot +reboot diff --git a/packages/sysutils/ConsoleKit/scripts/ck-system-stop b/packages/sysutils/ConsoleKit/scripts/ck-system-stop index 29be405b0f..a6e24e8385 100755 --- a/packages/sysutils/ConsoleKit/scripts/ck-system-stop +++ b/packages/sysutils/ConsoleKit/scripts/ck-system-stop @@ -20,20 +20,4 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -. /etc/profile - - progress "Poweroff the system" - RET=0 - - RUNLEVEL="poweroff" - - 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 - - sync - poweroff -f +poweroff diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index 7754bf3976..9c131e1521 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -55,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