aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2005-12-27 17:37:04 +0000
committerMicah Anderson <micah@riseup.net>2005-12-27 17:37:04 +0000
commit52d4622f5d12371a7a2c4a5f3e15754db0b8af76 (patch)
tree6227b774ab377641d9861f2ea9936fbbd699b076
parent5d835a799c48227b3535caf1954db0ca8af70f45 (diff)
downloadbackupninja-52d4622f5d12371a7a2c4a5f3e15754db0b8af76.tar.gz
backupninja-52d4622f5d12371a7a2c4a5f3e15754db0b8af76.tar.bz2
r216@um: micah | 2005-12-27 09:50:17 -0500
Set home properly when using vservers
-rw-r--r--handlers/mysql5
1 files changed, 4 insertions, 1 deletions
diff --git a/handlers/mysql b/handlers/mysql
index 0f5cd5c..b6a2f2a 100644
--- a/handlers/mysql
+++ b/handlers/mysql
@@ -120,8 +120,11 @@ then
if [ $usevserver ]
then
home=`$VSERVER $vsname exec getent passwd "root" | awk -F: '{print $6}'`
+ home="$vroot$home"
+ info "Home set to: $home"
else
home=`getent passwd "root" | awk -F: '{print $6}'`
+ info "Home set to: $home"
fi
[ -d $home ] || fatal "Can't find root's home directory ($home)."
mycnf="$home/.my.cnf"
@@ -151,7 +154,7 @@ EOF
umask $oldmask
defaultsfile="--defaults-file=$mycnf"
elif [ "$userset" == "false" ]; then
- # if user is set, don't use $configfile
+ # if user is set, don't use $mycnf
defaultsfile="--defaults-file=$configfile"
fi