Browse Source

Merge pull request #5725 from xwang2713/HPCC_111258_user_home

HPCC-11258 Improve grep pattern to get user home directory

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 11 years ago
parent
commit
a3303f2f63
1 changed files with 1 additions and 1 deletions
  1. 1 1
      initfiles/bash/etc/init.d/install-init.in

+ 1 - 1
initfiles/bash/etc/init.d/install-init.in

@@ -178,7 +178,7 @@ binPath="$path/bin"
 add_user $user $group $homePath || exit 1
 
 # If user already exists get the home directory
-homePath=$(cat /etc/passwd | grep -e "^$user" | cut -d':' -f6)
+homePath=$(cat /etc/passwd | grep -e "^${user}:" | cut -d':' -f6)
 homeBase=$(dirname $homePath)
 echo ""