diff --git a/packages/mediacenter/xbmc-pvr/init.d/93_xbmc b/packages/mediacenter/xbmc-pvr/init.d/93_xbmc index 176dc6344..4477d39a2 100644 --- a/packages/mediacenter/xbmc-pvr/init.d/93_xbmc +++ b/packages/mediacenter/xbmc-pvr/init.d/93_xbmc @@ -72,14 +72,15 @@ fi )& # prevent restrating XBMC at reboot or shutdown - XBMC_LOCKED="/storage/xbmc_locked" - [ -f $XBMC_LOCKED ] && rm -f $XBMC_LOCKED & + LOCKDIR="/var/lock/" + LOCKFILE="xbmc.disabled" + [ -f "$LOCKDIR/$LOCKFILE" ] && rm -f "$LOCKDIR/$LOCKFILE" & # starting XBMC usleep $XBMC_STARTDELAY while true; do - while [ -f $XBMC_LOCKED ]; do + while [ -f "$LOCKDIR/$LOCKFILE" ]; do usleep 250000 done @@ -89,19 +90,19 @@ fi case "$RET" in 0) if [ ! $(pidof console-kit-daemon) ]; then - touch $XBMC_LOCKED + touch "$LOCKDIR/$LOCKFILE" poweroff -f fi ;; 64) if [ ! $(pidof console-kit-daemon) ]; then - touch $XBMC_LOCKED + touch "$LOCKDIR/$LOCKFILE" poweroff -f fi ;; 66) if [ ! $(pidof console-kit-daemon) ]; then - touch $XBMC_LOCKED + touch "$LOCKDIR/$LOCKFILE" reboot fi ;; diff --git a/packages/mediacenter/xbmc-pvr/scripts/wait_on_xbmc_exit b/packages/mediacenter/xbmc-pvr/scripts/wait_on_xbmc_exit old mode 100644 new mode 100755 diff --git a/packages/mediacenter/xbmc/init.d/93_xbmc b/packages/mediacenter/xbmc/init.d/93_xbmc index 3a198e27f..97d672337 100644 --- a/packages/mediacenter/xbmc/init.d/93_xbmc +++ b/packages/mediacenter/xbmc/init.d/93_xbmc @@ -72,14 +72,15 @@ fi )& # prevent restrating XBMC at reboot or shutdown - XBMC_LOCKED="/storage/xbmc_locked" - [ -f $XBMC_LOCKED ] && rm -f $XBMC_LOCKED & + LOCKDIR="/var/lock/" + LOCKFILE="xbmc.disabled" + [ -f "$LOCKDIR/$LOCKFILE" ] && rm -f "$LOCKDIR/$LOCKFILE" & # starting XBMC usleep $XBMC_STARTDELAY while true; do - while [ -f $XBMC_LOCKED ]; do + while [ -f "$LOCKDIR/$LOCKFILE" ]; do usleep 250000 done @@ -89,19 +90,19 @@ fi case "$RET" in 0) if [ ! $(pidof console-kit-daemon) ]; then - touch $XBMC_LOCKED + touch "$LOCKDIR/$LOCKFILE" poweroff -f fi ;; 64) if [ ! $(pidof console-kit-daemon) ]; then - touch $XBMC_LOCKED + touch "$LOCKDIR/$LOCKFILE" poweroff -f fi ;; 66) if [ ! $(pidof console-kit-daemon) ]; then - touch $XBMC_LOCKED + touch "$LOCKDIR/$LOCKFILE" reboot fi ;; diff --git a/packages/mediacenter/xbmc/scripts/wait_on_xbmc_exit b/packages/mediacenter/xbmc/scripts/wait_on_xbmc_exit old mode 100644 new mode 100755 diff --git a/packages/sysutils/ConsoleKit/scripts/ck-system-restart b/packages/sysutils/ConsoleKit/scripts/ck-system-restart index 4c77c37e7..35aa9e976 100755 --- a/packages/sysutils/ConsoleKit/scripts/ck-system-restart +++ b/packages/sysutils/ConsoleKit/scripts/ck-system-restart @@ -20,7 +20,8 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -XBMC_LOCKED="/storage/xbmc_locked" -touch $XBMC_LOCKED +LOCKDIR="/var/lock/" +LOCKFILE="xbmc.disabled" +touch "$LOCKDIR/$LOCKFILE" wait_on_xbmc_exit reboot diff --git a/packages/sysutils/ConsoleKit/scripts/ck-system-stop b/packages/sysutils/ConsoleKit/scripts/ck-system-stop index cc93d11f2..edaa2b308 100755 --- a/packages/sysutils/ConsoleKit/scripts/ck-system-stop +++ b/packages/sysutils/ConsoleKit/scripts/ck-system-stop @@ -20,7 +20,8 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -XBMC_LOCKED="/storage/xbmc_locked" -touch $XBMC_LOCKED +LOCKDIR="/var/lock/" +LOCKFILE="xbmc.disabled" +touch "$LOCKDIR/$LOCKFILE" wait_on_xbmc_exit poweroff