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 ae76900e2..b22fdb790 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -113,8 +113,8 @@ MountTrees () { break #exit 1 fi - TRIES=`expr $TRIES + 1` - S=`expr $RANDOM % 20` + TRIES=$[ $TRIES+1 ] + S=$[ $RANDOM%20 ] echo "Can't mount $SERV:$MNT... Sleeping $S seconds then trying again" >/dev/console sleep $S done @@ -139,7 +139,7 @@ ResolveLinks () { while read type path do ELIST[$i]="$type $path"; - i=`expr $i + 1`; + i=$[ $i+1 ]; done num=${#ELIST[@]} @@ -162,10 +162,10 @@ ResolveLinks () { if [ "$efound" = "1" ]; then # put it into CLIST - CLIST[`expr ${#CLIST[@]}`]=${ELIST[$i]} + CLIST[$[ ${#CLIST[@]} ]]=${ELIST[$i]} else # put it into PLIST - PLIST[`expr ${#PLIST[@]}`]=${ELIST[$i]} + PLIST[$[ ${#PLIST[@]} ]]=${ELIST[$i]} fi done 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 46a5a149a..03c1a133e 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 @@ -113,8 +113,8 @@ MountTrees () { break #exit 1 fi - TRIES=`expr $TRIES + 1` - S=`expr $RANDOM % 20` + TRIES=$[ $TRIES + 1 ] + S=$[ $RANDOM % 20 ] echo "Can't mount $SERV:$MNT... Sleeping $S seconds then trying again" >/dev/console sleep $S done @@ -139,7 +139,7 @@ ResolveLinks () { while read type path do ELIST[$i]="$type $path"; - i=`expr $i + 1`; + i=$[ $i + 1 ]; done num=${#ELIST[@]} @@ -162,10 +162,10 @@ ResolveLinks () { if [ "$efound" = "1" ]; then # put it into CLIST - CLIST[`expr ${#CLIST[@]}`]=${ELIST[$i]} + CLIST[$[ ${#CLIST[@]} ]]=${ELIST[$i]} else # put it into PLIST - PLIST[`expr ${#PLIST[@]}`]=${ELIST[$i]} + PLIST[$[ ${#PLIST[@]} ]]=${ELIST[$i]} fi done