1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 18:38:30 +00:00

Added in a suggest function in order to get the wildcard working again

This commit is contained in:
Niall Donegan 2012-07-23 16:52:42 +01:00
parent 344c19174e
commit 005ab0c7f5

View file

@ -8,6 +8,12 @@
# #
# config (required) # config (required)
# autoconf (optional - used by munin-config) # autoconf (optional - used by munin-config)
# suggest
#
# Needs to be run as root, so the following needs to be added to the config:
#
# [lvm_]
# user root
# #
# $Log$ # $Log$
# #
@ -15,14 +21,20 @@
# scripts): # scripts):
# #
#%# family=auto #%# family=auto
#%# capabilities=autoconf #%# capabilities=autoconf suggest
if [ "$1" = "autoconf" ]; then if [ "$1" = "autoconf" ]; then
echo yes echo yes
exit 0 exit 0
fi fi
vg=`echo $0 | awk '{ sub(".*lvm","",\$1); print \$1; }'` if [ "$1" = "suggest" ]; then
vgs -o vg_name --noheadings | sed -e 's/\ *//'
exit 0
fi
vg=`echo $0 | awk '{ sub(".*lvm_","",\$1); print \$1; }'`
clean_name() { clean_name() {
echo $1 | sed 's/[\/.-]/_/g' echo $1 | sed 's/[\/.-]/_/g'