diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite index e9993198e..5a0e8f7dd 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -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" diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat index f52b1f315..36222df89 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite.ppc.redhat @@ -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"