r216@um: micah | 2005-12-27 09:50:17 -0500
authormicah <micah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Tue, 27 Dec 2005 17:37:04 +0000 (17:37 +0000)
committermicah <micah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Tue, 27 Dec 2005 17:37:04 +0000 (17:37 +0000)
 Set home properly when using vservers

git-svn-id: http://code.autistici.org/svn/backupninja/trunk@277 758a04ac-41e6-0310-8a23-8373a73cc35d

handlers/mysql

index 0f5cd5c470e9312b994b782a1c1e67f29b1c493b..b6a2f2ab9c83b1c4af01256f4ddfc5a1d5b3f49d 100644 (file)
@@ -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