stop () { PRG_PID=`pidof $PRG` if [ $? != 0 ]; then PRG_PID="" fi if [ "x$PRG_PID" = "x" ]; then echo $PRG $CP_not_running $APPEND else $MONIT unmonitor $PRG if kill $PRG_PID 2>/dev/null; then progress_msg="
Waiting ." cnt=0 while kill $PRG_PID 2>/dev/null; do cnt=`expr "$cnt" + 1` if [ "$cnt" -gt 15 ]; then kill -9 -$PRG_PID break fi sleep 1 echo -n $progress_msg progress_msg=" ." done fi fi # echo $CP_waiting $WAIT $CP_seconds $APPEND if [ "x${HAVP_RAMDISK}" = "xon" ]; then echo "$CP_havp_umount Ramdisk $APPEND" /bin/umount /dev/ram1 fi }