From: Matthijs Kooijman Date: Thu, 1 Jan 2009 18:56:12 +0000 (+0100) Subject: mysql: Properly set the path to .my.conf when vservers are used. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=85f69abc9779dd28c0dfdf128aa4c77e08fe3b7f;p=matthijs%2Fupstream%2Fbackupninja.git mysql: Properly set the path to .my.conf when vservers are used. This fixes the case when the user option and the vsname option are both used. --- diff --git a/handlers/mysql.in b/handlers/mysql.in index d22ef26..3a908f6 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -161,7 +161,11 @@ else debug "User home set to: $userhome" [ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf" - defaultsfile="--defaults-extra-file=$userhome/.my.cnf" + if [ $usevserver = yes ]; then + defaultsfile="--defaults-extra-file=$vuserhome/.my.cnf" + else + defaultsfile="--defaults-extra-file=$userhome/.my.cnf" + fi debug "using $defaultsfile" fi