mirror of
https://github.com/libretro/Lakka.git
synced 2024-12-11 17:54:16 +00:00
xbmc & xbmc-pvr: redesign of poweroff and reboot. Change lock file location
This commit is contained in:
parent
33ef1232fb
commit
7e8f0340e3
@ -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
|
||||
;;
|
||||
|
0
packages/mediacenter/xbmc-pvr/scripts/wait_on_xbmc_exit
Normal file → Executable file
0
packages/mediacenter/xbmc-pvr/scripts/wait_on_xbmc_exit
Normal file → Executable file
@ -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
|
||||
;;
|
||||
|
0
packages/mediacenter/xbmc/scripts/wait_on_xbmc_exit
Normal file → Executable file
0
packages/mediacenter/xbmc/scripts/wait_on_xbmc_exit
Normal file → Executable file
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user