aboutsummaryrefslogtreecommitdiff
path: root/handlers/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'handlers/mysql')
-rw-r--r--handlers/mysql2
1 files changed, 1 insertions, 1 deletions
diff --git a/handlers/mysql b/handlers/mysql
index 57b9ecf..4ac631b 100644
--- a/handlers/mysql
+++ b/handlers/mysql
@@ -22,7 +22,7 @@ if [ "$user" == "" ]; then
user=root;
else
userset=true;
- userhome=`grep "^$user:" /etc/passwd | awk -F: '{print $6}'`
+ userhome=`getent passwd "$user" | awk -F: '{print $6}'`
[ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
fi