X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=handlers%2Fmysql;h=569b0a206d21dc4b509539fd969c2ce6e9d181e3;hp=4ac631b574bf9d2836b52d45c17246662d0571c2;hb=02ffef7501e137ea83563b1b16937e938d3b8c4d;hpb=55427e72e27238e86d205399eb8b379ebcc14ef5 diff --git a/handlers/mysql b/handlers/mysql index 4ac631b..569b0a2 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -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