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 f9696b3e7..c7fd7f76b 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -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" 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 6216a37ac..20a226161 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 @@ -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"