mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Fix lvdisplay path on some hosts.
Signed-off-by: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
This commit is contained in:
parent
c25a07f290
commit
8051623fe4
1 changed files with 13 additions and 11 deletions
|
@ -14,17 +14,19 @@
|
||||||
#%# capabilities=autoconf
|
#%# capabilities=autoconf
|
||||||
#
|
#
|
||||||
# 2011/05/20 - pmoranga - initial version
|
# 2011/05/20 - pmoranga - initial version
|
||||||
|
#
|
||||||
|
# 2012/01/27 - Sébastien Gross
|
||||||
|
# - Fix lvdisplay path
|
||||||
|
|
||||||
|
lvdisplay=$(which lvdisplay)
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
/usr/sbin/lvdisplay 2>/dev/null >/dev/null
|
if test -n "${lvdisplay}"; then
|
||||||
if [ $? -eq 0 ]
|
echo yes
|
||||||
then
|
exit 0
|
||||||
echo yes
|
fi
|
||||||
exit 0
|
echo "no lvdisplay found"
|
||||||
else
|
exit 1
|
||||||
echo "no lvdisplay found"
|
|
||||||
fi
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,9 +36,9 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'graph_vlabel %'
|
echo 'graph_vlabel %'
|
||||||
echo 'graph_category disk'
|
echo 'graph_category disk'
|
||||||
echo 'graph_args --base 100'
|
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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
/usr/sbin/lvdisplay -C | awk '$3 ~ /^s/{print $1".value",int($6)} '
|
${lvdisplay} -C | awk '$3 ~ /^s/{print $1".value",int($6)} '
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue