diff options
Diffstat (limited to 'scripts/hypr-live-update-guard')
| -rwxr-xr-x | scripts/hypr-live-update-guard | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/hypr-live-update-guard b/scripts/hypr-live-update-guard index 614414b..e78200d 100755 --- a/scripts/hypr-live-update-guard +++ b/scripts/hypr-live-update-guard @@ -42,8 +42,15 @@ set -u sentinel="${HYPR_GUARD_SENTINEL:-/run/archsetup-allow-live-gpu-update}" -# Explicit override: the user knows what they're doing. -if [ "${HYPR_ALLOW_LIVE_UPDATE:-0}" = "1" ] || [ -e "$sentinel" ]; then +# Explicit override: the user knows what they're doing. The sentinel is +# consumed as it's honored — one touch buys exactly one transaction, so a +# leftover from a crashed caller can't keep the guard disarmed until +# reboot. +if [ "${HYPR_ALLOW_LIVE_UPDATE:-0}" = "1" ]; then + exit 0 +fi +if [ -e "$sentinel" ]; then + rm -f "$sentinel" 2>/dev/null || true exit 0 fi |
