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'
|
XM='/usr/sbin/xm'
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e $XM ]; then
|
if [ -x "$XM" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
else
|
||||||
|
echo "no (xm not found)"
|
||||||
fi
|
fi
|
||||||
echo "no (xm not found)"
|
exit 0
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
|
@ -12,16 +12,13 @@ NAME=$( echo "$DOMAIN" | sed -e's/-/_/g' )
|
|||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if which xm > /dev/null ; 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
|
else
|
||||||
echo "no (xm not found)"
|
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
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -11,16 +11,13 @@
|
|||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if which xm > /dev/null ; 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
|
else
|
||||||
echo "no (xm not found)"
|
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
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user