change the setup of USERHOME to use lsuser on AIX, the old grep caused the rm -rf / if two root entries in the /etc/passwd file

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4287 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2009-10-02 17:08:04 +00:00
parent 52a7cd76a3
commit d7e10ac2a6

View File

@ -25,7 +25,7 @@ if [ -z "$2" ]; then
if [ -x /usr/bin/getent ];then
USERHOME=`getent passwd $1|awk -F: '{print $6}'`
else
USERHOME=`grep ^$1: /etc/passwd | cut -d: -f6`
USERHOME=`lsuser -a home root | cut -d'=' -f2`
fi
else
CNA="$1"