Module: check_mk
Branch: master
Commit: 1dc2fac8ddc6421b121f3a293a918f7b40756530
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1dc2fac8ddc642…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Thu Jan 10 07:16:52 2019 +0100
mk_logwatch.aix: double brackets apparently not always available
Change-Id: I9053cd69dc61c469fad2eef34e4b65a5ae516526
---
agents/plugins/mk_logwatch.aix | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/agents/plugins/mk_logwatch.aix b/agents/plugins/mk_logwatch.aix
index ceb7ec0..0c7f970 100755
--- a/agents/plugins/mk_logwatch.aix
+++ b/agents/plugins/mk_logwatch.aix
@@ -19,13 +19,13 @@ echo "[[[errorlog]]]"
# the last line we already reported (may be empty)
LINE=$(tail -n1 "$MK_LOGWATCH_AIX_STATE" 2> /dev/null)
-if [[ "$LINE" ]]; then # get rid of all lines after that:
+if [ "$LINE" ]; then # get rid of all lines after that:
OUT=$(errpt | awk '/'"$LINE"'/ {exit}; (NR>1) {printf
"C %s\n", $0}')
else # LINE is empty -> report all
OUT=$(errpt | awk '(NR>1) {printf "C %s\n", $0}')
fi
-if [[ "$OUT" ]]; then
+if [ "$OUT" ]; then
# output data; if successful, remember most recent
echo "$OUT" && echo "$OUT" | head -n1 | sed 's/^C\
//' > "$MK_LOGWATCH_AIX_STATE"
fi