@@ -194,9 +194,9 @@ function ozo-validate-job {
194194 # concatenate RDEF_EXCLUDES, LMOUNTPOINT and (if set) RHOST_EXCLUDES
195195 if [[ -n " ${RHOST_EXCLUDES} " ]]
196196 then
197- JOB_EXCLUDES=" ${RDEF_EXCLUDES} ,${LMOUNTPOINT} , ${ RHOST_EXCLUDES}"
197+ JOB_EXCLUDES=" ${RDEF_EXCLUDES} ,${RHOST_EXCLUDES} "
198198 else
199- JOB_EXCLUDES=" ${RDEF_EXCLUDES} , ${LMOUNTPOINT} "
199+ JOB_EXCLUDES=" ${RDEF_EXCLUDES} "
200200 fi
201201 # parse commas into rdiff-backup include/exclude flags
202202 JOB_INCLUDES=" ${JOB_INCLUDES// ,/ --include } "
@@ -237,7 +237,7 @@ function ozo-rdiff-backup {
237237 # ## Returns 0 (TRUE) if the job is successful and 1 (FALSE) if there are any errors
238238 local RETURN=0
239239 LEVEL=" info" MESSAGE=" Starting Rdiff-Backup job." ozo-log
240- if rdiff-backup -v 0 --remote-schema " ssh -C -p ${RSSHPORT} {h} rdiff-backup server --restrict-mode read-only" backup --create-full-path --include ${JOB_INCLUDES} --exclude ${JOB_EXCLUDES} ${RHOSTUSER} @${RHOSTFQDN} ::/ ${RHOSTFQDN_INCREMENTS_DIR}
240+ if rdiff-backup -v 0 --remote-schema " ssh -C -p ${RSSHPORT} {h} rdiff-backup server --restrict-mode read-only" backup --create-full-path --include ${JOB_INCLUDES} --exclude ${JOB_EXCLUDES} --exclude-if-present ${LMOUNTPOINT} --exclude-device-files --exclude-fifos ${RHOSTUSER} @${RHOSTFQDN} ::/ ${RHOSTFQDN_INCREMENTS_DIR}
241241 then
242242 # rdiff-backup succeeded; log
243243 LEVEL=" info" MESSAGE=" Rdiff-Backup job finished with success." ozo-log
@@ -287,8 +287,9 @@ function ozo-program-loop {
287287 if ozo-mount-uuid
288288 then
289289 # UUID mounted, iterate through the jobs
290- for CONF in " $( ls ${LCONF_DIR} /* conf) "
290+ for CONF in $( ls ${LCONF_DIR} /* conf)
291291 do
292+ unset RHOSTUSER RHOSTFQDN RSSHPORT RHOST_INCLUDES RHOST_EXCLUDES
292293 source ${CONF}
293294 # validate the job
294295 if ozo-validate-job
@@ -343,12 +344,14 @@ function ozo-program-loop {
343344EXIT=0
344345
345346LEVEL=" info" MESSAGE=" Rdiff-Backup starting." ozo-log
346- if ozo-program-loop > /dev/null 2& > 1
347+ # if ozo-program-loop
348+ if ozo-program-loop > /dev/null 2>&1
347349then
348350 # run was successful
349351 LEVEL=" info" MESSAGE=" Rdiff-Backup finished with success." ozo-log
350352else
351353 # run failed one or more jobs
354+ unset RHOSTUSER RHOSTFQDN RSSHPORT RHOST_INCLUDES RHOST_EXCLUDES
352355 LEVEL=" err" MESSAGE=" Rdiff-Backup finished with errors." ozo-log
353356 EXIT=1
354357fi
0 commit comments