From cd350b4c5766b4117fe89b97429044211c6af525 Mon Sep 17 00:00:00 2001 From: Jens Maus Date: Mon, 28 Oct 2024 09:49:18 +0100 Subject: [PATCH] fix issue with idle-check.sh cronjob not sourcing in global env variables correctly because cron only uses a minimal set of env variables. Now idle-check.sh sources in /etc/profile for receiving the global variables correctly. --- buildroot-external/rootfs-overlay/bin/idle-check.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buildroot-external/rootfs-overlay/bin/idle-check.sh b/buildroot-external/rootfs-overlay/bin/idle-check.sh index cae7970..c6c724c 100755 --- a/buildroot-external/rootfs-overlay/bin/idle-check.sh +++ b/buildroot-external/rootfs-overlay/bin/idle-check.sh @@ -1,5 +1,5 @@ #!/bin/sh -# shellcheck shell=dash disable=SC2169,SC3010 +# shellcheck shell=dash disable=SC2169,SC3010 source=/dev/null # # System Idle Shutdown (idle-check.sh) # ------------------------------------ @@ -50,6 +50,9 @@ # published by the Free Software Foundation, version 2. # +# source global env variables +. /etc/profile + # default config [[ -z "${SHUTDOWN_IDLE_INTERVAL}" ]] && SHUTDOWN_IDLE_INTERVAL=5 [[ -z "${SHUTDOWN_IDLE_TIME}" ]] && SHUTDOWN_IDLE_TIME=86400