From 2ae46040845d06772e2cfeb82bd018ddad33fd30 Mon Sep 17 00:00:00 2001 From: Vincent-FK Date: Sat, 19 Jun 2021 00:58:41 +0200 Subject: [PATCH] fixed frontend look cases where lask_opk file could be removed after the instant action SIGUSR1 signal --- FunKey/board/funkey/rootfs-overlay/usr/local/sbin/frontend | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/frontend b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/frontend index fabc199..c4e3d69 100755 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/frontend +++ b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/frontend @@ -71,14 +71,16 @@ init_frontend() { while true; do # Check if frontend disable file is present - if [ -f "${DISABLE_FRONTEND_FILE}" ]; then + if [ -f "${DISABLE_FRONTEND_FILE}" -o -f "${REBOOTING_FILE}" ]; then echo "${DISABLE_FRONTEND_FILE} file found, not starting frontend" sleep 5 else # Umount any remaining OPK, if any umount /opk >/dev/null 2>&1 - rm -f "${LAST_OPK_FILE}" + if [ -r "${LAST_OPK_FILE}" -a ! -f "${REBOOTING_FILE}" ]; then + rm "${LAST_OPK_FILE}" + fi # Launch selected frontend local frontend="$(get_frontend)"