mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2026-03-19 02:12:41 +01:00
no more loop in start_launcher after shutdown
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Notify system, reboot in progress
|
||||
REBOOTING_FILE="/run/rebooting"
|
||||
touch $REBOOTING_FILE
|
||||
|
||||
# Notif fullscreen "Shutting down"
|
||||
notif_set 0 "^^^^^^^^ SHUTTING DOWN...^^^^^^^^"
|
||||
|
||||
@@ -9,6 +13,7 @@ start_audio_amp 0 >/dev/null 2>&1
|
||||
# Force Read Only
|
||||
ro
|
||||
|
||||
# Unmount writeable partition to force
|
||||
umount -r /mnt
|
||||
|
||||
# Poweroff
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
LOCK_FILE="/var/lock/launcher.lock"
|
||||
INSTANT_PLAY_FILE="/mnt/instant_play"
|
||||
PREVENT_LAUNCHER_FILE="/mnt/prevent_launcher"
|
||||
REBOOTING_FILE="/run/rebooting"
|
||||
|
||||
|
||||
if [ -f "${LOCK_FILE}" ]; then
|
||||
@@ -56,12 +57,19 @@ while true; do
|
||||
wait $!
|
||||
erase_pid
|
||||
|
||||
# Restart ampli audio if necessary
|
||||
start_audio_amp 1 >/dev/null 2>&1
|
||||
|
||||
# In case retrofe quits with errors, clear graphic VT
|
||||
termfix_all
|
||||
fi
|
||||
|
||||
# WD to prevent 100% CPU
|
||||
sleep 0.5
|
||||
|
||||
# Exit if console rebooting
|
||||
if [ -f $REBOOTING_FILE ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove lock file and exit
|
||||
rm "${LOCK_FILE}"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user