[monitoring-plugins] Apparently Dash is not Bash, so -v does not work
RincewindsHat
git at monitoring-plugins.org
Mon Dec 20 16:00:13 CET 2021
Module: monitoring-plugins
Branch: master
Commit: c1bf69c3a6a52c714e27107219e402bbecd7c000
Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
Date: Mon Dec 20 00:08:24 2021 +0100
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=c1bf69c
Apparently Dash is not Bash, so -v does not work
---
plugins-scripts/check_log.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh
index d71f420..fdb5741 100755
--- a/plugins-scripts/check_log.sh
+++ b/plugins-scripts/check_log.sh
@@ -212,7 +212,7 @@ elif [ ! -r "$logfile" ] ; then
exit "$STATE_UNKNOWN"
fi
# If no oldlog was given this can not work properly, abort then
-if [ ! -v oldlog ]; then
+if [ -z "$oldlog" ]; then
echo "Oldlog parameter is needed"
exit $STATE_UNKNOWN
fi
More information about the Commits
mailing list