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() {