From fe8908c3260995330283293c620f8c5d8cf1683b Mon Sep 17 00:00:00 2001 From: "K.Cima" Date: Mon, 28 Nov 2016 23:53:47 +0900 Subject: [PATCH] Fix to add double quote to supress shellcheck warnings --- plugins/oracle/oracle_sysstat_ | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/oracle/oracle_sysstat_ b/plugins/oracle/oracle_sysstat_ index 4cabf842..d2a2afc7 100755 --- a/plugins/oracle/oracle_sysstat_ +++ b/plugins/oracle/oracle_sysstat_ @@ -78,21 +78,21 @@ #%# capabilities=autoconf suggest # Include plugin.sh -. $MUNIN_LIBDIR/plugins/plugin.sh +. "${MUNIN_LIBDIR}/plugins/plugin.sh" # Like perl 'use strict;' #set -o nounset # Environments -: ${ORACLE_HOME:=$( echo /opt/oracle/product/* )} -: ${ORACLE_SID:=orcl} -: ${oracle_auth:=/ as SYSDBA} +: "${ORACLE_HOME:=$( echo /opt/oracle/product/* )}" +: "${ORACLE_SID:=orcl}" +: "${oracle_auth:=/ as SYSDBA}" PATH=$PATH:$ORACLE_HOME/bin export PATH ORACLE_HOME ORACLE_SID # Module name -module=$( basename $0 | sed -e 's/^.*_//' ) +module=$( basename "$0" | sed -e 's/^.*_//' ) # Graph settings declare -A global_attrs # required @@ -476,7 +476,7 @@ sqlplus_variables=" # functions autoconf() { - if [ -x "$( which ${sqlplus} )" ]; then + if [ -x "$( which "${sqlplus}" )" ]; then echo yes else echo "no (failed to find executable 'sqlplus')" @@ -484,7 +484,7 @@ autoconf() { } suggest() { - echo ${!global_attrs[@]} | tr ' ' '\n' | sort + echo "${!global_attrs[@]}" | tr ' ' '\n' | sort } config() { @@ -503,12 +503,12 @@ config() { draw="${t[2]}" label="${t[3]}" - echo ${field}.type ${type} - echo ${field}.draw ${draw} - echo ${field}.label ${label} + echo "${field}.type" "$type" + echo "${field}.draw" "$draw" + echo "${field}.label" "$label" done <<< "${data_attrs[$module]}" - echo graph_order ${fields[@]} + echo graph_order "${fields[@]}" } getfield() {