From 9bfcd7fb650757da7169939eebc347b067356f51 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Wed, 14 Jul 2010 10:25:51 +0000 Subject: [PATCH] update the code for "STATEMNT=" parameter in xcat-prepivot.sh git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6742 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/netboot/rh/dracut/xcat-prepivot.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/dracut/xcat-prepivot.sh b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-prepivot.sh index 6ee5b641f..92e391292 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut/xcat-prepivot.sh +++ b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-prepivot.sh @@ -3,9 +3,11 @@ NEWROOT=/sysroot SERVER=${SERVER%%/*} SERVER=${SERVER%:} RWDIR=.statelite -if [ ! -z $statemnt ]; then #btw, uri style might have left future options other than nfs open, will u se // to detect uri in the future I guess - SNAPSHOTSERVER=${statemnt%:*} - SNAPSHOTROOT=${statemnt#*/} +if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other than nfs open, will u se // to detect uri in the future I guess + SNAPSHOTSERVER=${STATEMNT%:*} + SNAPSHOTROOT=${STATEMNT#*/} + echo $SNAPSHOTROOT + echo $SNAPSHOTSERVER # may be that there is not server and just a directory. if [ -z $SNAPSHOTROOT ]; then SNAPSHOTROOT=$SNAPSHOTSERVER @@ -44,8 +46,8 @@ if [ ! -z $SNAPSHOTSERVER ]; then mkdir -p $NEWROOT/$RWDIR/persistent MAXTRIES=5 ITER=0 - while ! mount $SNAPSHOTSERVER:$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o nolock,rsize=32768,tc p,nfsvers=3,timeo=14; do - ITER=$((ITER +1 )) + while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o nolock,rsize=32768,tcp,nfsvers=3,timeo=14; do + ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then echo "Your are dead, rpower $ME boot to play again." echo "Possible problems: