Fixed quoting

This commit is contained in:
deajan 2019-05-22 21:02:26 +02:00
parent 0b539e6153
commit c801d6b418
1 changed files with 9 additions and 9 deletions

View File

@ -31,7 +31,7 @@
#### OFUNCTIONS MINI SUBSET #### #### OFUNCTIONS MINI SUBSET ####
#### OFUNCTIONS MICRO SUBSET #### #### OFUNCTIONS MICRO SUBSET ####
_OFUNCTIONS_VERSION=2.3.0-dev-postRC2 _OFUNCTIONS_VERSION=2.3.0-dev-postRC2
_OFUNCTIONS_BUILD=2019052201 _OFUNCTIONS_BUILD=2019052202
#### _OFUNCTIONS_BOOTSTRAP SUBSET #### #### _OFUNCTIONS_BOOTSTRAP SUBSET ####
_OFUNCTIONS_BOOTSTRAP=true _OFUNCTIONS_BOOTSTRAP=true
#### _OFUNCTIONS_BOOTSTRAP SUBSET END #### #### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
@ -579,7 +579,7 @@ function SendEmail {
if [ "$MAIL_BODY_CHARSET" != "" ]; then if [ "$MAIL_BODY_CHARSET" != "" ]; then
if type iconv > /dev/null 2>&1; then if type iconv > /dev/null 2>&1; then
echo "$message" | iconv -f UTF-8 -t $MAIL_BODY_CHARSET -o "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.iconv.$SCRIPT_PID.$TSTAMP" echo "$message" | iconv -f UTF-8 -t $MAIL_BODY_CHARSET -o "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.iconv.$SCRIPT_PID.$TSTAMP"
message="$(cat $RUN_DIR/$PROGRAM.${FUNCNAME[0]}.iconv.$SCRIPT_PID.$TSTAMP)" message="$(cat "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.iconv.$SCRIPT_PID.$TSTAMP")"
else else
Logger "iconv utility not installed. Will not convert email charset." "NOTICE" Logger "iconv utility not installed. Will not convert email charset." "NOTICE"
fi fi
@ -1114,7 +1114,7 @@ function ExecTasks {
Logger "Command was [${commandsArrayPid[$pid]}]." "ERROR" Logger "Command was [${commandsArrayPid[$pid]}]." "ERROR"
fi fi
if [ -f "${commandsArrayOutput[$pid]}" ]; then if [ -f "${commandsArrayOutput[$pid]}" ]; then
Logger "Command output was [$(cat ${commandsArrayOutput[$pid]})\n]." "ERROR" Logger "Command output was [$(cat "${commandsArrayOutput[$pid]}")\n]." "ERROR"
fi fi
fi fi
errorcount=$((errorcount+1)) errorcount=$((errorcount+1))
@ -1216,7 +1216,7 @@ function ExecTasks {
postponedRetryCount=0 postponedRetryCount=0
postponedExecTime=0 postponedExecTime=0
fi fi
if ([ $postponedRetryCount -lt $maxPostponeRetries ] && [ $postponedExecTime -ge $((minTimeBetweenRetries)) ]) || [ $isPostponedCommand == false ]; then if ([ $postponedRetryCount -lt $maxPostponeRetries ] && [ $postponedExecTime -ge $minTimeBetweenRetries ]) || [ $isPostponedCommand == false ]; then
if [ "$currentCommandCondition" != "" ]; then if [ "$currentCommandCondition" != "" ]; then
Logger "Checking condition [$currentCommandCondition] for command [$currentCommand]." "DEBUG" Logger "Checking condition [$currentCommandCondition] for command [$currentCommand]." "DEBUG"
eval "$currentCommandCondition" & eval "$currentCommandCondition" &
@ -1777,7 +1777,7 @@ function RunLocalCommand {
fi fi
if [ $_LOGGER_VERBOSE == true ] || [ $retval -ne 0 ]; then if [ $_LOGGER_VERBOSE == true ] || [ $retval -ne 0 ]; then
Logger "Command output:\n$(cat $RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP)" "NOTICE" Logger "Command output:\n$(cat "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP")" "NOTICE"
fi fi
if [ "$STOP_ON_CMD_ERROR" == true ] && [ $retval -ne 0 ]; then if [ "$STOP_ON_CMD_ERROR" == true ] && [ $retval -ne 0 ]; then
@ -1820,7 +1820,7 @@ function RunRemoteCommand {
if [ -f "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP" ] && ([ $_LOGGER_VERBOSE == true ] || [ $retval -ne 0 ]) if [ -f "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP" ] && ([ $_LOGGER_VERBOSE == true ] || [ $retval -ne 0 ])
then then
Logger "Command output:\n$(cat $RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP)" "NOTICE" Logger "Command output:\n$(cat "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP")" "NOTICE"
fi fi
if [ "$STOP_ON_CMD_ERROR" == true ] && [ $retval -ne 0 ]; then if [ "$STOP_ON_CMD_ERROR" == true ] && [ $retval -ne 0 ]; then
@ -1959,8 +1959,8 @@ function RsyncPatternsFromAdd {
__CheckArguments 2 $# "$@" #__WITH_PARANOIA_DEBUG __CheckArguments 2 $# "$@" #__WITH_PARANOIA_DEBUG
## Check if the exclude list has a full path, and if not, add the config file path if there is one ## Check if the exclude list has a full path, and if not, add the config file path if there is one
if [ "$(basename $patternFrom)" == "$patternFrom" ]; then if [ "$(basename "$patternFrom")" == "$patternFrom" ]; then
patternFrom="$(dirname $CONFIG_FILE)/$patternFrom" patternFrom="$(dirname "$CONFIG_FILE")/$patternFrom"
fi fi
if [ -e "$patternFrom" ]; then if [ -e "$patternFrom" ]; then
@ -2183,7 +2183,7 @@ function InitRemoteOSDependingSettings {
__CheckArguments 0 $# "$@" #__WITH_PARANOIA_DEBUG __CheckArguments 0 $# "$@" #__WITH_PARANOIA_DEBUG
if [ "$REMOTE_OS" == "msys" ] || [ "$REMOTE_OS" == "Cygwin" ]; then if [ "$REMOTE_OS" == "msys" ] || [ "$REMOTE_OS" == "Cygwin" ]; then
REMOTE_FIND_CMD=$(dirname $BASH)/find REMOTE_FIND_CMD="$(dirname $BASH)/find"
else else
REMOTE_FIND_CMD=find REMOTE_FIND_CMD=find
fi fi