aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2006-01-03 16:09:29 +0000
committerMicah Anderson <micah@riseup.net>2006-01-03 16:09:29 +0000
commitee384b08c7dc9a1605e9525acd343099c763860e (patch)
tree897a89cc5391a6657b73101e281c3be7cfc75e6b /handlers
parent2ee26aba568bd740bd37006e9bca3ffeca71ce39 (diff)
downloadbackupninja-ee384b08c7dc9a1605e9525acd343099c763860e.tar.gz
backupninja-ee384b08c7dc9a1605e9525acd343099c763860e.tar.bz2
Fixed mysql no user defaults file handling
Diffstat (limited to 'handlers')
-rw-r--r--handlers/mysql8
1 files changed, 3 insertions, 5 deletions
diff --git a/handlers/mysql b/handlers/mysql
index 7ca9ab6..d317930 100644
--- a/handlers/mysql
+++ b/handlers/mysql
@@ -139,15 +139,12 @@ EOF
else
defaultsfile="--defaults-file=$mycnf"
fi
-
-# if user is set, don't use $mycnf
-elif [ "$userset" == "false" ]; then
- defaultsfile="--defaults-file=$configfile"
fi
+# if a user is not set, use $confgfile, otherwise use $mycnf
if [ "$user" == "" ]; then
- userset=false;
user=root;
+ defaultsfile="--defaults-file=$configfile"
else
userset=true;
if [ $usevserver ]
@@ -238,6 +235,7 @@ then
then
if [ $usevserver ]
then
+ 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