diff --git a/precompiled/opt/startup.sh b/precompiled/opt/startup.sh index 2341cd1c..9f7a058f 100755 --- a/precompiled/opt/startup.sh +++ b/precompiled/opt/startup.sh @@ -65,4 +65,6 @@ chown pi:pi /tmp/.local chown pi:pi /tmp/.config chown pi:pi /tmp/openauto.ini +/sbin/shutdown --poweroff 15 + exit 0 diff --git a/precompiled/opt/wake_up.sh b/precompiled/opt/wake_up.sh index 1fd8d8b4..61ba8c70 100755 --- a/precompiled/opt/wake_up.sh +++ b/precompiled/opt/wake_up.sh @@ -2,9 +2,14 @@ # we need to probe the value of the bl_power first # to not wake up the screen if it's already up -BL_PWR=`cat /sys/class/backlight/rpi_backlight/bl_power` -if [ ${BL_PWR} -ne 0 ]; then +if [ -f /sys/class/backlight/rpi_backlight/bl_power ]; then + BL_PWR=`cat /sys/class/backlight/rpi_backlight/bl_power` + + if [ ${BL_PWR} -ne 0 ]; then + vcgencmd display_power 1 + echo 0 > /sys/class/backlight/rpi_backlight/bl_power + fi +else vcgencmd display_power 1 - echo 0 > /sys/class/backlight/rpi_backlight/bl_power fi