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

Merge pull request #18 from renard/lvm-fix

Fix lvdisplay path on some hosts.
This commit is contained in:
Steve Schnepp 2012-01-28 06:23:58 -08:00
commit 0d11e10677

View File

@ -14,16 +14,18 @@
#%# capabilities=autoconf
#
# 2011/05/20 - pmoranga - initial version
#
# 2012/01/27 - Sébastien Gross
# - Fix lvdisplay path
lvdisplay=$(which lvdisplay)
if [ "$1" = "autoconf" ]; then
/usr/sbin/lvdisplay 2>/dev/null >/dev/null
if [ $? -eq 0 ]
then
if test -n "${lvdisplay}"; then
echo yes
exit 0
else
echo "no lvdisplay found"
fi
echo "no lvdisplay found"
exit 1
fi
@ -34,9 +36,9 @@ if [ "$1" = "config" ]; then
echo 'graph_vlabel %'
echo 'graph_category disk'
echo 'graph_args --base 100'
/usr/sbin/lvdisplay -C | awk '$3 ~ /^s/{print $1".label "$1" snapshot of "$5} '
${lvdisplay} -C | awk '$3 ~ /^s/{print $1".label "$1" snapshot of "$5} '
exit 0
fi
/usr/sbin/lvdisplay -C | awk '$3 ~ /^s/{print $1".value",int($6)} '
${lvdisplay} -C | awk '$3 ~ /^s/{print $1".value",int($6)} '