mysql tried to remove a tmpfile that didn't exist, fixed check for this
[matthijs/upstream/backupninja.git] / handlers / mysql
index ebde4abf6e427dcdbd50c3a34026fa88257b193f..ae54aae7f2a2c0500b8999e03e043009e6eb7768 100644 (file)
@@ -160,7 +160,7 @@ else
        
        debug "User home set to: $userhome"
        [ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
-       defaultsfile="--defaults-file=$vuserhome/.my.cnf"
+       defaultsfile="--defaults-file=$userhome/.my.cnf"
        debug "using $defaultsfile"
 fi
 
@@ -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"