From b78be683388187b83805698c180970e509d8fd5d Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Mon, 27 Jun 2011 14:51:33 +1000 Subject: [PATCH] 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. --- automysqlbackup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automysqlbackup.sh b/automysqlbackup.sh index 3e7bd77..0f7ca4d 100755 --- a/automysqlbackup.sh +++ b/automysqlbackup.sh @@ -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