From 83081b757b5be288b835ecb65953aea550b3e7b4 Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 18 Aug 2021 23:00:49 -0500 Subject: [PATCH] Fix incorrect variable substitution i.e. a lack thereof --- check_reboot_required | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_reboot_required b/check_reboot_required index 57fa29f..3c7af6a 100755 --- a/check_reboot_required +++ b/check_reboot_required @@ -14,10 +14,10 @@ if [ -f "$rr" ]; then lastmod=$(date +%s -r "$rr") now=$(date +%s) if (( now - lastmod > threshold )); then - echo "CRITICAL - Pending reboot older than $threshold seconds: $(cat rr)" + echo "CRITICAL - Pending reboot older than $threshold seconds: $(cat "$rr")" exit 2 else - echo "WARNING - Pending reboot: $(cat rr)" + echo "WARNING - Pending reboot: $(cat "$rr")" exit 1 fi else