X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=handlers%2Fmysql;h=8d59fa4b0cd1cb897b8199605930a604058adf6b;hb=921babdf413f370acccc5e125a2c37fbdd18afd3;hp=4ac631b574bf9d2836b52d45c17246662d0571c2;hpb=1645c0c8572abe98f4d92d951ad3482b15cd4db4;p=matthijs%2Fupstream%2Fbackupninja.git diff --git a/handlers/mysql b/handlers/mysql index 4ac631b..8d59fa4 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -57,7 +57,7 @@ then [ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'" # is it running ? running=`$VSERVERINFO $vsname RUNNING` - [ $running = 1 ] || fatal "vserver $vsname is not running." + [ "$running" = "1" ] || fatal "vserver $vsname is not running." fi # create backup dirs, the vroot variable will be empty if no vsname was specified @@ -95,7 +95,7 @@ fi defaultsfile="" if [ "$dbusername" != "" -a "$dbpassword" != "" ]; then - home=`grep '^root:' /etc/passwd | awk -F: '{print $6}'` + home=`getent passwd "root" | awk -F: '{print $6}'` [ -d $home ] || fatal "Can't find root's home directory ($home)." mycnf="$home/.my.cnf" if [ -f $mycnf ]; then