Make sure the hostname has been set before configure the statelite

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14794 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2013-01-08 06:25:22 +00:00
parent e47dc2635d
commit 7da34b6fc2
2 changed files with 22 additions and 0 deletions

View File

@ -22,6 +22,17 @@ declare -a CLIST
declare -a PLIST
ME=`hostname -s`
MAX=30
TRIES=1
while [ x$ME = x ];do
TRIES=$[ $TRIES+1 ]
if [ $TRIES -eq $MAX ]; then
echo "Can NOT get the hostname of the node. System will fail to enable the persistent files.">/dev/console
break
fi
sleep 1
ME=`hostname -s`
done
PERSISTENT="${MNTDIR}/$SL/persistent/$ME"

View File

@ -22,6 +22,17 @@ declare -a CLIST
declare -a PLIST
ME=`hostname`
MAX=30
TRIES=1
while [ x$ME = x ];do
TRIES=$[ $TRIES+1 ]
if [ $TRIES -eq $MAX ]; then
echo "Can NOT get the hostname of the node. System will fail to enable the persistent files.">/dev/console
break
fi
sleep 1
ME=`hostname -s`
done
PERSISTENT="${MNTDIR}/$SL/persistent/$ME"