[ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
# is it running ?
running=`$VSERVERINFO $vsname RUNNING`
- [ $running = 1 ] || fatal "vserver $vsname is not running."
+ [ "$running" = "1" ] || fatal "vserver $vsname is not running."
fi
# create backup dirs, the vroot variable will be empty if no vsname was specified
defaultsfile=""
if [ "$dbusername" != "" -a "$dbpassword" != "" ]; then
- home=`grep '^root:' /etc/passwd | awk -F: '{print $6}'`
+ home=`getent passwd "root" | awk -F: '{print $6}'`
[ -d $home ] || fatal "Can't find root's home directory ($home)."
mycnf="$home/.my.cnf"
if [ -f $mycnf ]; then