From fefcad986e268d265ca5923f9104658f8aaa3449 Mon Sep 17 00:00:00 2001 From: Stig Sandbeck Mathisen Date: Sun, 5 Oct 2014 15:49:54 +0200 Subject: [PATCH] Work around false positive in checkbashisms - Nothing wrong with the plugin, but checkbashisms triggers on the presence of a variable called $HOSTNAME - Changing the variable name in the plugin is the "easy way out". --- plugins/snmp/snmp__webthermometer | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/snmp/snmp__webthermometer b/plugins/snmp/snmp__webthermometer index fb6fd0ad..c81ac19f 100755 --- a/plugins/snmp/snmp__webthermometer +++ b/plugins/snmp/snmp__webthermometer @@ -40,11 +40,11 @@ if [ "$1" = "suggest" ]; then if [ ! "$RC" != "0" ] ; then FILE=`basename $0` DIR=`dirname $0` - HOSTNAME=`host $IP | sed s/.*pointer//\ ` - HOSTNAME=`echo $HOSTNAME | sed -e 's/\.$//'` + HOST_NAME=`host $IP | sed s/.*pointer//\ ` + HOST_NAME=`echo $HOST_NAME | sed -e 's/\.$//'` LINKDIR="/etc/munin/plugins/" - LINKFILE=`echo $FILE | sed s/__/_$HOSTNAME_/` - echo file $FILE dir $DIR hostname $HOSTNAME linkdir $LINKDIR linkfile $LINKFILE + LINKFILE=`echo $FILE | sed s/__/_$HOST_NAME_/` + echo file $FILE dir $DIR hostname $HOST_NAME linkdir $LINKDIR linkfile $LINKFILE #echo "ln -s $DIR/$FILE $LINKNAME" fi