1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Restructure incomplete or broken "autoconf" implementations

Some plugins with non-zero autoconf exitcodes (it must be zero instead)
deserved a bit of code cleanup for improved readability.
This commit is contained in:
Lars Kruse 2018-09-16 05:03:47 +02:00
parent 46e2de55de
commit 9cef55a3ed
15 changed files with 85 additions and 105 deletions

View file

@ -32,23 +32,16 @@ do_config () {
}
do_autoconf () {
if [ ! -f $PNWL ] ; then
echo "no (no $PNWL)"
exit 1
if [ ! -f "$PNWL" ]; then
echo "no (missing file '$PNWL')"
elif [ ! -r "$PNWL" ]; then
echo "no (cannot read file '$PNWL')"
elif grep -qs : "$PNWL"; then
echo yes
else
echo "no (no devices in $PNWL)"
fi
if [ ! -r $PNWL ] ; then
echo "no (could not read $PNWL)"
exit 1
fi
if grep -qs : $PNWL ; then
echo yes
exit 0
fi
echo "no (no devices in $PNWL)"
exit 1
exit 0
}
case $1 in