add mntopts to litetree mount command

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13305 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
nott 2012-07-16 17:14:57 +00:00
parent c1863f23e1
commit 6adb4327a0

View File

@ -210,8 +210,17 @@ MountTrees () {
SERV=`echo $i | /usr/bin/awk -F'|' '{print $2}'`
DIR=`echo $i | /usr/bin/awk -F'|' '{print $3}'`
OPTS=`echo $i | /usr/bin/awk -F'|' '{print $4}'`
if [ "$OPTS" = "" ]; then
MOPTS=" -o llock "
else
MOPTS=" -o llock -o $OPTS "
fi
if [ ! -d ${MOUNTDIR}/${SERV}${DIR} ]; then
# ex. /.statelite/mnt/10.2.0.200/etc/
echo "/usr/bin/mkdir -m 755 -p ${MOUNTDIR}/${SERV}${DIR}" >>$LOG
/usr/bin/mkdir -m 755 -p ${MOUNTDIR}/${SERV}${DIR}
fi
@ -219,7 +228,8 @@ MountTrees () {
TRIES=1
# ex. 10.2.0.200:/etc/ /.statelite/mnt/10.2.0.200/etc/
while ! /usr/sbin/mount -o llock $SERV:$DIR ${MOUNTDIR}/${SERV}${DIR}
echo "/usr/sbin/mount ${MOPTS} $SERV:$DIR ${MOUNTDIR}/${SERV}${DIR}" >>$LOG
while ! /usr/sbin/mount ${MOPTS} $SERV:$DIR ${MOUNTDIR}/${SERV}${DIR}
do
if [ "$TRIES" = "$MAX" ]
then
@ -228,7 +238,7 @@ MountTrees () {
fi
TRIES=`expr $TRIES + 1`
S=`expr $RANDOM % 20`
echo "Can't mount $SERV:$MNT... Sleeping $S seconds then trying again" >>$LOG
echo "Can't mount $SERV:$DIR... Sleeping $S seconds then trying again" >>$LOG
sleep $S
done
done