ports/sysutils/munin-common/files/patch-plugins_node.d_squeezebox__.in
Mathieu Arnold 2ff6de7ee9 Fix the bind9_rndc plugin wrt Perl 5.18+ hash randomzation.
While there, group all patches for the three ports in munin-common, and remove
an obsolete patch.

PR:		195689
Submitted by:	Vlad "Blackflow" K.
Sponsored by:	Absolight
2014-12-10 15:52:14 +00:00

38 lines
1.8 KiB
Text

--- plugins/node.d/squeezebox_.in.orig 2014-11-24 21:46:24 UTC
+++ plugins/node.d/squeezebox_.in
@@ -157,7 +157,7 @@ if [ "$CMD" = "years" ]; then
printf "graph_order y"
echo $years_array | sed 's/ / y/g'
- for i in `seq 0 $no_of_years`; do
+ for i in `jot - 0 $no_of_years`; do
year=$(echo ${arr1[$i]})
if [ $year = 0 ]; then
echo y0.label No year
@@ -172,7 +172,7 @@ if [ "$CMD" = "years" ]; then
done
exit 0
fi
- for i in `seq 0 $no_of_years`; do
+ for i in `jot - 0 $no_of_years`; do
year=$(echo ${arr1[$i]})
printf "y%s.value " ${year}
printf "%b" "albums 0 0 year:${year}\nexit\n" | $NC $HOST $PORT | sed 's/%3A/:/g' | cut -d ':' -f 3
@@ -183,7 +183,7 @@ elif [ "$CMD" = "signalstrength" -o "$CM
echo "graph_category Squeezebox"
COUNT=$(printf "%b" "player count ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 3)
(( COUNT-- ))
- for ID in $(seq 0 $COUNT); do
+ for ID in $(jot - 0 $COUNT); do
MAC=$(printf "%b" "player id $ID ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 4 | sed 's/%3A/:/g')
NAME=$(printf "%b" "player name $MAC ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 4 | sed 's/%20/ /g')
MAC2=$(echo $MAC | sed 's/://g; s/\./_/g')
@@ -193,7 +193,7 @@ elif [ "$CMD" = "signalstrength" -o "$CM
fi
COUNT=$(printf "%b" "player count ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 3)
(( COUNT-- ))
- for ID in $(seq 0 $COUNT); do
+ for ID in $(jot - 0 $COUNT); do
MAC=$(printf "%b" "player id $ID ?\nexit\n" | $NC $HOST $PORT | cut -d " " -f 4 | sed 's/%3A/:/g')
VAL=$(printf "%b" "$MAC $CMD ?\nexit\n"| $NC $HOST $PORT | cut -d " " -f 2- | sed "s/$CMD //")
MAC2=$(echo $MAC| sed 's/://g')