IBM Data Server DB2 User Manual
Page 98

84
DB2 Deployment Guide
return 0
}
# deploy DB2 fixpack using installFixPack
db2fp_dply()
{
set ${setopts?}
# check if $INSTPATH exists
${RCMD} test -d $INSTPATH
rc=$?
if [ $rc != 0 ]; then
 printf "Specified path %s does not exist.\n" $INSTPATH
 rc=1
else
 # verify input base path exists in remote machine
 ${RCMD} "su - root -c db2ls"|egrep '^'"$INSTPATH"' ' > /dev/null 2>&1
 rc=$?
 if [ $rc != 0 ]; then
 echo "No DB2 installation found under $INSTPATH."
 echo "This machine is ignored."
 rc=2
 else
 # populate the command line params for installFixPack
 INSTALL_PARAM=`echo ${INSTPATH:+"-b $INSTPATH"}" "${NLPATH:+"-c $LOCALNFS/$NLPATH"}" 
-n "\
 ${FOPT:+"$FOPT"}" "${LOGFILE:+"-l $LOGFILE"}" "${TRC:+"-t $TRC"}`
 # check if any DB2 process in memory
 chkdb2proc
 if [ $? == 0 ]; then
 ${RCMD} $LOCALNFS/installFixPack $INSTALL_PARAM
 rc=$?
 fi
 fi
fi
return $rc
}
# main program
# parse command line options
case $# in
 0) syntax
 exit 1;;
 *) while getopts "N:H:b:c:f:l:t:" OPT
 do
 case $OPT in
 # NFS mount path, and host list
 N) NFSPATH=$OPTARG ;;
 H) HOSTLIST=`echo "$OPTARG"|sed 's/,/ /g'`;;
 b) INSTPATH=$OPTARG ;;
 c) NLPATH=$OPTARG ;;
