mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
xbmc:
- various cleanups
This commit is contained in:
parent
d7e52e75f3
commit
ab5d32a1d8
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
export XBMC_HOME="/usr/share/xbmc"
|
export XBMC_HOME="/usr/share/xbmc"
|
||||||
args="--standalone -fs --lircdev $LIRC_OUTPUT"
|
args="--standalone -fs --lircdev $LIRC_OUTPUT"
|
||||||
LOOP=1
|
|
||||||
|
|
||||||
print_crash_report()
|
print_crash_report()
|
||||||
{
|
{
|
||||||
@ -28,12 +27,7 @@ print_crash_report()
|
|||||||
echo -n " Kernel: " >> $FILE
|
echo -n " Kernel: " >> $FILE
|
||||||
uname -rvs >> $FILE
|
uname -rvs >> $FILE
|
||||||
echo -n " Release: " >> $FILE
|
echo -n " Release: " >> $FILE
|
||||||
if which lsb_release &> /dev/null; then
|
cat /etc/openelec-release >> $FILE
|
||||||
echo >> $FILE
|
|
||||||
lsb_release -a 2> /dev/null | sed -e 's/^/ /' >> $FILE
|
|
||||||
else
|
|
||||||
echo "lsb_release not available" >> $FILE
|
|
||||||
fi
|
|
||||||
echo "############## END SYSTEM INFO ##############" >> $FILE
|
echo "############## END SYSTEM INFO ##############" >> $FILE
|
||||||
echo >> $FILE
|
echo >> $FILE
|
||||||
echo "############### STACK TRACE #################" >> $FILE
|
echo "############### STACK TRACE #################" >> $FILE
|
||||||
@ -60,23 +54,31 @@ print_crash_report()
|
|||||||
|
|
||||||
ulimit -c unlimited
|
ulimit -c unlimited
|
||||||
|
|
||||||
while true; do
|
while true
|
||||||
|
do
|
||||||
DISPLAY=:0.0 /usr/bin/xbmc ${args} > /dev/null 2>&1
|
DISPLAY=:0.0 /usr/bin/xbmc ${args} > /dev/null 2>&1
|
||||||
RET=$?
|
RET=$?
|
||||||
echo "Exited with code $RET"
|
echo "Exited with code $RET"
|
||||||
if [[ $RET >= 131 && $RET <= 136] || $RET == 139 ]; then
|
|
||||||
print_crash_report
|
if [ "$RET" == 0 ]; then
|
||||||
elif [ $RET == 0 ]; then
|
|
||||||
break
|
|
||||||
elif [ $RET == 64 ]; then
|
|
||||||
break
|
break
|
||||||
|
|
||||||
|
elif [ "$RET" == 64 ]; then
|
||||||
sync
|
sync
|
||||||
poweroff
|
poweroff
|
||||||
break
|
|
||||||
elif [ $RET == 65 || $RET == 66 ]; then
|
elif [ "$RET" == 65 ]; then
|
||||||
break
|
LOOP=1
|
||||||
|
|
||||||
|
elif [ "$RET" == 66 ]; then
|
||||||
sync
|
sync
|
||||||
reboot
|
reboot
|
||||||
break
|
|
||||||
|
elif [ "$RET" >= 131 ] && [ "$RET" <= 136 ]; then
|
||||||
|
print_crash_report
|
||||||
|
|
||||||
|
elif [ "$RET" == 139 ]; then
|
||||||
|
print_crash_report
|
||||||
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user