aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorElijah Saxon <elijah@riseup.net>2005-03-21 17:48:34 +0000
committerElijah Saxon <elijah@riseup.net>2005-03-21 17:48:34 +0000
commit9f9a16697883529f3271b3b44ab742b217726e2a (patch)
tree16fc4e97f757a07740a356d7339421492f0d571a /handlers
parent7a8a4455bed618e18254dcadb319c69a95edd64d (diff)
downloadbackupninja-9f9a16697883529f3271b3b44ab742b217726e2a.tar.gz
backupninja-9f9a16697883529f3271b3b44ab742b217726e2a.tar.bz2
fixed bug when system has multiple usernames starting with "root".
Diffstat (limited to 'handlers')
-rw-r--r--handlers/mysql2
1 files changed, 1 insertions, 1 deletions
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