Module: check_mk
Branch: master
Commit: 0c74cf1ab6ea0238d2343ea317cfdcc74d965e04
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0c74cf1ab6ea02…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Sep 12 09:14:28 2017 +0200
updated werk 5113
Change-Id: Ie8e62228ff310a751c9430b58993cd34ffab00ce
---
.werks/5113 | 2 +-
agents/check_mk_agent.aix | 20 ++++++++------------
agents/check_mk_agent.linux | 20 +++++++++-----------
3 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/.werks/5113 b/.werks/5113
index c0cc253..ceca3e8 100644
--- a/.werks/5113
+++ b/.werks/5113
@@ -1,4 +1,4 @@
-Title: cifsmounts, nfsmounts: Fixed wrong reported error message if user has not right
permissions on mount point
+Title: cifsmounts: Fixed wrong reported error message if user has not right permissions
on mount point
Level: 1
Component: checks
Compatible: compat
diff --git a/agents/check_mk_agent.aix b/agents/check_mk_agent.aix
index 6f5f5a7..dcc7a39 100755
--- a/agents/check_mk_agent.aix
+++ b/agents/check_mk_agent.aix
@@ -142,25 +142,21 @@ if type stat >/dev/null 2>&1 ; then
echo '<<<nfsmounts>>>'
mount | grep ' nfs' | awk '{print $3;}' | \
while read MP
- do
- if [ ! -r $MP ]; then
- echo "$MP Permission denied"
- else
- waitmax 2 stat -f -c '"'$MP' ok - - - -"'
"$MP" || \
- echo "$MP hanging 0 0 0 0"
- fi
- done
+ do
+ waitmax 2 stat -f -c '"'$MP' ok - - - -"'
"$MP" || \
+ echo "$MP hanging 0 0 0 0"
+ done
echo '<<<cifsmounts>>>'
mount | grep ' cifs' | awk '{print $3;}' | \
while read MP
- do
+ do
if [ ! -r $MP ]; then
echo "$MP Permission denied"
else
- waitmax 2 stat -f -c '"'$MP' ok - - - -"'
"$MP" || \
- echo "$MP hanging 0 0 0 0"
+ waitmax 2 stat -f -c '"'$MP' ok - - - -"'
"$MP" || \
+ echo "$MP hanging 0 0 0 0"
fi
- done
+ done
fi
echo '<<<ps>>>'
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 2f5b94b..267138c 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -299,17 +299,15 @@ then
sed -n '/ nfs4\? /s/[^ ]* \([^ ]*\) .*/\1/p' < /proc/mounts |
sed 's/\\040/ /g' |
while read MP
- do
- if [ ! -r $MP ]; then
- echo "$MP Permission denied"
- elif [ $STAT_VERSION != $STAT_BROKE ]; then
- waitmax -s 9 2 stat -f -c "$MP ok %b %f %a %s" "$MP" || \
- echo "$MP hanging 0 0 0 0"
- else
- waitmax -s 9 2 stat -f -c "$MP ok %b %f %a %s" "$MP"
&& \
- printf '\n'|| echo "$MP hanging 0 0 0 0"
- fi
- done
+ do
+ if [ $STAT_VERSION != $STAT_BROKE ]; then
+ waitmax -s 9 2 stat -f -c "$MP ok %b %f %a %s" "$MP" ||
\
+ echo "$MP hanging 0 0 0 0"
+ else
+ waitmax -s 9 2 stat -f -c "$MP ok %b %f %a %s" "$MP"
&& \
+ printf '\n'|| echo "$MP hanging 0 0 0 0"
+ fi
+ done
echo '<<<cifsmounts>>>'
sed -n '/ cifs\? /s/[^ ]* \([^ ]*\) .*/\1/p' < /proc/mounts |