2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Plugins xen_*: fix 'autoconf' logic and exitcode

This commit is contained in:
Lars Kruse 2018-08-01 23:51:50 +02:00
parent 4b4a6a01e1
commit 4d2d1fb94b
3 changed files with 14 additions and 20 deletions

View File

@ -15,12 +15,12 @@
XM='/usr/sbin/xm'
if [ "$1" = "autoconf" ]; then
if [ -e $XM ]; then
if [ -x "$XM" ]; then
echo yes
exit 0
else
echo "no (xm not found)"
fi
echo "no (xm not found)"
exit 1
exit 0
fi
if [ "$1" = "config" ]; then

View File

@ -12,16 +12,13 @@ NAME=$( echo "$DOMAIN" | sed -e's/-/_/g' )
if [ "$1" = "autoconf" ]; then
if which xm > /dev/null ; then
echo yes
if [ -r /proc/net/dev ]; then
echo yes
else
echo "no (/proc/net/dev not found)"
fi
else
echo "no (xm not found)"
exit 1
fi
if [ -r /proc/net/dev ]; then
echo yes
else
echo "no (/proc/net/dev not found)"
exit 1
fi
exit 0
fi

View File

@ -11,16 +11,13 @@
if [ "$1" = "autoconf" ]; then
if which xm > /dev/null ; then
echo yes
if [ -r /proc/net/dev ]; then
echo yes
else
echo "no (/proc/net/dev not found)"
fi
else
echo "no (xm not found)"
exit 1
fi
if [ -r /proc/net/dev ]; then
echo yes
else
echo "no (/proc/net/dev not found)"
exit 1
fi
exit 0
fi