mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Improve incorrect or unspecific output for "autoconf"
Some plugins emit wrongly formatted "no" messages or lack the "yes" message on success.
This commit is contained in:
parent
e4cd049b01
commit
2ec4e4c1f7
20 changed files with 68 additions and 99 deletions
|
@ -97,30 +97,20 @@ default_timeout=20
|
|||
default_join_lines=true
|
||||
|
||||
if [ "${1}" = "autoconf" ]; then
|
||||
result=0
|
||||
if [ -z "${wget_bin}" -o ! -f "${wget_bin}" -o ! -x "${wget_bin}" ]; then
|
||||
result=1
|
||||
if [ -z "$wget_bin" ] || [ ! -f "$wget_bin" ] || [ ! -x "$wget_bin" ]; then
|
||||
echo "no (missing 'wget' executable)"
|
||||
elif [ -z "$time_bin" ] || [ ! -f "$time_bin" ] || [ ! -x "$time_bin" ]; then
|
||||
echo "no (missing 'time' executable)"
|
||||
elif [ -z "$mktemp_bin" ] || [ ! -f "$mktemp_bin" ] || [ ! -x "$mktemp_bin" ]; then
|
||||
echo "no (missing 'mktemp' executable)"
|
||||
elif [ -z "$grep_bin" ] || [ ! -f "$grep_bin" ] || [ ! -x "$grep_bin" ]; then
|
||||
echo "no (missing 'grep' executable)"
|
||||
elif [ -z "$tail_bin" ] || [ ! -f "$tail_bin" ] || [ ! -x "$tail_bin" ]; then
|
||||
echo "no (missing 'tail' executable)"
|
||||
else
|
||||
if [ -z "${time_bin}" -o ! -f "${time_bin}" -o ! -x "${time_bin}" ]; then
|
||||
result=2
|
||||
else
|
||||
if [ -z "${mktemp_bin}" -o ! -f "${mktemp_bin}" -o ! -x "${mktemp_bin}" ]; then
|
||||
result=3
|
||||
else
|
||||
if [ -z "${grep_bin}" -o ! -f "${grep_bin}" -o ! -x "${grep_bin}" ]; then
|
||||
result=4
|
||||
else
|
||||
[ -z "${tail_bin}" -o ! -f "${tail_bin}" -o ! -x "${tail_bin}" ] && result=5
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ ${result} -eq 0 ]; then
|
||||
echo "yes"
|
||||
else
|
||||
echo "no"
|
||||
fi
|
||||
exit $result
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "${names}" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue