Instead of 'eval'-ing the pre/post commands, source them. This gives the scripts access to all the VARs set in the initial script so that they can access the DB names, etc.

This commit is contained in:
Andrew Smith 2011-06-27 14:51:33 +10:00
parent 827071b9f0
commit b78be68338

View File

@ -353,7 +353,7 @@ if [ "${PREBACKUP}" ]
${ECHO} ======================================================================
${ECHO} "Prebackup command output."
${ECHO}
eval ${PREBACKUP}
source ${PREBACKUP}
${ECHO}
${ECHO} ======================================================================
${ECHO}
@ -534,7 +534,7 @@ if [ "${POSTBACKUP}" ]
${ECHO} ======================================================================
${ECHO} "Postbackup command output."
${ECHO}
eval ${POSTBACKUP}
source ${POSTBACKUP}
${ECHO}
${ECHO} ======================================================================
fi