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

Plugins tc_*: check existence of "tc" during autoconf

This commit is contained in:
Lars Kruse 2018-09-18 03:07:05 +02:00
parent 272220c61a
commit 6995742e59
3 changed files with 15 additions and 9 deletions

View File

@ -50,10 +50,12 @@ mytc() {
case "$1" in
autoconf)
if [ -r /proc/net/dev ]; then
echo yes
else
if [ ! -r /proc/net/dev ]; then
echo "no (/proc/net/dev not found)"
elif [ ! -x /sbin/tc ]; then
echo "no (missing 'tc' executable)"
else
echo yes
fi
exit 0
;;

View File

@ -21,10 +21,12 @@ mytc() {
case $1 in
autoconf)
if [ -r /proc/net/dev ]; then
echo yes
else
if [ ! -r /proc/net/dev ]; then
echo "no (/proc/net/dev not found)"
elif ! which tc >/dev/null; then
echo "no (missing 'tc' executable)"
else
echo yes
fi
exit 0
;;

View File

@ -21,10 +21,12 @@ mytc() {
case $1 in
autoconf)
if [ -r /proc/net/dev ]; then
echo yes
else
if [ ! -r /proc/net/dev ]; then
echo "no (/proc/net/dev not found)"
elif ! which tc >/dev/null; then
echo "no (missing 'tc' executable)"
else
echo yes
fi
exit 0
;;