X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=handlers%2Fmysql;h=2dcf2d5a936e5d11b7982ec380ff7dde46dffb3c;hb=a21b0685484c50d84c79cc1fe8bd1bb7d50c98f3;hp=f89d8d724bccd00d6a401f0cd408cb740ab2f8c9;hpb=a8d99f1b1ea19e0dcd902b78dffd4c26603c93e1;p=matthijs%2Fupstream%2Fbackupninja.git diff --git a/handlers/mysql b/handlers/mysql index f89d8d7..2dcf2d5 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -179,7 +179,7 @@ then else execstr="$MYSQLHOTCOPY --quiet --allowold --regexp /.\*/./.\*/ $hotdir" fi - debug "su $user -c '$execstr'" + debug 'su $user -c "$execstr"' if [ ! $test ] then output=`su $user -c "$execstr" 2>&1` @@ -202,7 +202,7 @@ then else execstr="$MYSQLHOTCOPY --allowold $db $hotdir" fi - debug "su $user -c '$execstr'" + debug 'su $user -c "$execstr"' if [ ! $test ] then output=`su $user -c "$execstr" 2>&1` @@ -230,7 +230,7 @@ then then if [ $usevserver = yes ] then - debug "echo show databases | $VSERVER $vsname exec su $user -c $MYSQL $defaultsfile | grep -v Database" + debug 'echo show databases | $VSERVER $vsname exec su $user -c \"$MYSQL $defaultsfile\" | grep -v Database' databases=`echo 'show databases' | $VSERVER $vsname exec su $user -c "$MYSQL $defaultsfile" | grep -v Database` if [ $? -ne 0 ] then @@ -253,7 +253,7 @@ fi else execstr="$MYSQLDUMP $defaultsfile --lock-tables --complete-insert --add-drop-table --quick --quote-names $ignore $db > $dumpdir/${db}.sql" fi - debug "su $user -c '$execstr'" + debug 'su $user -c "$execstr"' if [ ! $test ] then output=`su $user -c "$execstr" 2>&1` @@ -277,7 +277,7 @@ fi fi # clean up tmp config file -if [ "$dbusername" != "" ] +if [ "$dbusername" != "" -a "$dbpassword" != "" ] then ## clean up tmp config file debug "rm $mycnf"