aboutsummaryrefslogtreecommitdiff
path: root/handlers/mysql
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2005-10-02 17:35:22 +0000
committerintrigeri <intrigeri@boum.org>2005-10-02 17:35:22 +0000
commit1645c0c8572abe98f4d92d951ad3482b15cd4db4 (patch)
tree185f868441b88e5c3a55c1c9ab01071837c3b06f /handlers/mysql
parent995e34e1663e2448dea174412d58ff03ad32c6cc (diff)
downloadbackupninja-1645c0c8572abe98f4d92d951ad3482b15cd4db4.tar.gz
backupninja-1645c0c8572abe98f4d92d951ad3482b15cd4db4.tar.bz2
r188@krups: intrigeri | 2005-10-03 01:14:37 +0200
Replaced awful "grep /etc/passwd" with getent calls in pgsql and mysql handlers
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