1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

[chrony] switch from bash to sh; fix shell style issues

This commit is contained in:
Lars Kruse 2016-11-10 23:19:38 +01:00
parent 39976312f7
commit 6cb29a3bf3

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#
# Script to parse Chrony Tracking Output
#
@ -52,11 +52,11 @@ if [ "$1" = "config" ]; then
echo 'graph_category time'
i=0
for a in $fields ; do
i=$(expr $i + 1);
word=`echo $fieldnames | cut -f $i -d '='`;
factor=`echo $fieldfactors | cut -f $i -d ' '`;
i=$((i + 1))
word="$(echo "$fieldnames" | cut -f "$i" -d '=')"
factor="$(echo "$fieldfactors" | cut -f "$i" -d ' ')"
echo "$a.label $word$factor)";
echo "$a.type GAUGE";
echo "$a.type GAUGE"
done
exit 0
fi