mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-08 11:52:32 +01:00
fixed bug when system has multiple usernames starting with "root".
This commit is contained in:
parent
7a8a4455be
commit
9f9a166978
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user