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:
parent
4b4a6a01e1
commit
4d2d1fb94b
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user