Make sure the hostname has been set before configure the statelite

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14797 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2013-01-08 06:34:44 +00:00
parent 028c57b77f
commit 6ce7c4a5ed
2 changed files with 22 additions and 0 deletions

View File

@ -21,6 +21,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

@ -21,6 +21,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"