From 9f9a16697883529f3271b3b44ab742b217726e2a Mon Sep 17 00:00:00 2001 From: Elijah Saxon Date: Mon, 21 Mar 2005 17:48:34 +0000 Subject: [PATCH] fixed bug when system has multiple usernames starting with "root". --- handlers/mysql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/mysql b/handlers/mysql index 165ebc6..6a8c3dd 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -27,7 +27,7 @@ dumpdir="$backupdir/sqldump" # temporary ~/.my.cnf in root's home directory). if [ "$dbusername" != "" ]; then - home=`grep '^root' /etc/passwd | awk -F: '{print $6}'` + home=`grep '^root:' /etc/passwd | awk -F: '{print $6}'` [ -d $home ] || fatal "Can't find root's home directory ($home)." mycnf="$home/.my.cnf" if [ -f $mycnf ]; then -- 2.30.2