66 DB2 Deployment Guide
# command-line syntax
syntax()
{
echo "
db2srv_install -D|-R -N <NFSpath> -H hostA,hostB,...,hostN
-r response_file -b install_path -f NOTSAMP
-p productShortName -c NLPACK_location -n
-L language -l logfile -t tracefile
"
}
# verify only one deployment method is specified
chksyntax()
{
set ${setopts?}
if [ -z "$MOD" ] || [ `echo "$MOD"|awk '{print length($0)}'` != 1 ]; then
syntax
exit 1
fi
}
# mount nfs onto remote machine
mountnfs()
{
set ${setopts?}
SKIP=0
# make a temporary mount point
${RCMD} mkdir $LOCALNFS
${RCMD} mount -o ro "$BASEHOST":"$NFSPATH" "$LOCALNFS"
rc=$?
# if mount fails, try once more
if [ $rc != 0 ]; then
echo "Mount failed on machine $host. Will try again 2 seconds later."
sleep 2
echo "Trying mount again..."
${RCMD} mount -o ro "$BASEHOST":"$NFSPATH" "$LOCALNFS"
rc=$?
if [ $rc != 0 ]; then
echo "Mount failed twice on machine $host. Will skip it."
SKIP="1"
# remove the temporary mount point
${RCMD} rmdir $LOCALNFS
fi
fi
return $SKIP
}
umountnfs()