projects
/
matthijs
/
upstream
/
backupninja-vserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mysql: Properly set the path to .my.conf when vservers are used.
[matthijs/upstream/backupninja-vserver.git]
/
handlers
/
mysql.in
diff --git
a/handlers/mysql.in
b/handlers/mysql.in
index c80a36a3d95881ba0aa8b4f8ba5fd20ec3efce05..3a908f68ef669b62e6c0cb3d63eeb230a5b86199 100644
(file)
--- a/
handlers/mysql.in
+++ b/
handlers/mysql.in
@@
-40,6
+40,8
@@
if [ $vservers_are_available = yes ]; then
else
info "No vserver name specified, actions will be performed on the host."
fi
else
info "No vserver name specified, actions will be performed on the host."
fi
+else
+ [ -z "$vsname" ] || warning 'vservers support disabled in backupninja.conf, vsname configuration line will be ignored'
fi
## Prepare ignore part of the command
fi
## Prepare ignore part of the command
@@
-159,7
+161,11
@@
else
debug "User home set to: $userhome"
[ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
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
debug "using $defaultsfile"
fi