{

set ${setopts?}

${RCMD} umount "$LOCALNFS" rc=$?

#if unmount fails, try once more if [ $rc != 0 ]; then

echo "Unmount failed on machine $host. Will try again 2 seconds later." sleep 2

echo "Trying unmount again..." ${RCMD} umount "$LOCALNFS" rc=$

if [ $rc != 0 ]; then

echo "Umount failed twice on machine $host. You need to do it manually." fi

fi

}

#deploy DB2 using specified response file resp_dply()

{

#the response file has to be accessible from remote machine

#so put it under $LOCALNFS

${RCMD} $LOCALNFS/db2setup -r "$LOCALNFS/$RESFILE" rc=$?

if [ "$rc" != 0 ]; then

printf "\n Deployment returns an error code \"%s\".\n" $rc

fi

return $rc

}

#deploy DB2 using db2_install db2install_dply()

{

set ${setopts?}

#when $INSTPATH specified, no conflict is allowed if [ ! -z "$INSTPATH" ]; then

${RCMD} db2lsegrep '^'"$INSTPATH"' ' > /dev/null 2>&1 rc=$?

if [ $rc == 0 ]; then

echo "The specified install path already exists." echo "This machine is ignored."

rc=1

else

# populate the command line params for db2_install

INSTALL_PARAM=`echo ${INSTPATH:+"-b $INSTPATH"}" "${SAMP:+"-f $SAMP"}" "\ ${PROD:+"-p $PROD"}" "${NLPATH:+"-c $NLPATH"}" "\ ${NLNAME:+"-L $NLNAME"}" "${LOGFILE:+"-l $LOGFILE "}" "\

Chapter 2. DB2 server deployment 67

Page 81
Image 81
IBM manual DB2 server deployment