$ GOTO BEGIN $!----------------------------------------------------------------------------- $!+ $! TCPIP$EXTENSION_MIB_SHUTDOWN.COM $! V5.1-00 $! $! Copyright 1998 Compaq Computer Corporation $! $! COMPAQ Registered in U.S. Patent and Trademark Office. $! $! Confidential computer software. Valid license from Compaq or $! authorized sublicensor required for possession, use or copying. $! Consistent with FAR 12.211 and 12.212, Commercial Computer Software, $! Computer Software Documentation, and Technical Data for Commercial $! Items are licensed to the U.S. Government under vendor's standard $! commercial license. $!+ $! $! Command procedure to remove images and stop processes for optional $! extension subagents. Assumption is that this procedure is called from $! TCPIP$SNMP_SHUTDOWN.COM and privileges are already enabled by the caller. $! $! 28-jul-1998 Sheldon Bishov sdb-v5.0-00 $! - Initial version, adapted from TCPIP$SNMP_SHUTDOWN.COM $! $! 24-jun-1999 Sheldon Bishov V5.1-00 $! Improve selection of processes starting with suggestion from Jason $! Fountain for using f$context() lexical. $! $! 07-mar-2000 Sheldon Bishov V5.1-00 $! Update with current example (Chess). $! $!----------------------------------------------------------------------------- $! $BEGIN: $! $ ON CONTROL_Y THEN GOTO EXIT $ ON ERROR THEN GOTO EXIT $! $ GOTO DEINSTALL $! $! Insert/substitute into PROCLIST the names of extension/custom subagents $! as a comma-separated list. Remove or comment out the GOTO above. $! Also see the instructions to edit the INSTALL DELETE commands below. $! Note that the name here must correspond to the one used in $! TCPIP$EXTENSION_MIB_RUN.COM, and have no more than 15 characters. $ PROCLIST = "TCPIP$CHESS_AGT" $! $ ELEMNUM = -1 $ CONTEXT = "" $! $GET_PID: $ IF F$TYPE(CONTEXT) .eqs. "PROCESS_CONTEXT" THEN - TEMP = F$CONTEXT ("PROCESS", CONTEXT, "CANCEL") $ ELEMNUM = ELEMNUM + 1 $ CURPROC = F$ELEMENT(ELEMNUM, ",", PROCLIST) $ IF CURPROC .EQS. "," THEN GOTO DEINSTALL $ TEMP = F$CONTEXT("PROCESS", CONTEXT, "PRCNAM", CURPROC, "EQL") $ PROCPID = F$PID(CONTEXT) $ IF PROCPID .EQS. "" THEN GOTO DEINSTALL $ PRCNAM = "''F$GETJPI(PROCPID,"PRCNAM")'" $ STOP /ID='PROCPID' $ WRITE SYS$OUTPUT "''PRCNAM' stopped" $ GOTO GET_PID $! $ DEINSTALL: $! This last check here should not be needed, keep in case of some unusual $! loop exit condition. $ IF F$TYPE(CONTEXT) .eqs. "PROCESS_CONTEXT" THEN - TEMP = F$CONTEXT ("PROCESS", CONTEXT, "CANCEL") $! $ ON WARNING THEN GOTO NO_SHARED $! $ GOTO EXIT $! $! If images have been installed: $! - Remove or comment out the GOTO above $! - Edit the next two lines and replicate as needed. $ LIBRARY = "SYS$SYSTEM:TCPIP$CHESS_SUBAGENT.EXE" $ IF F$FILE("''LIBRARY'","KNOWN") THEN INSTALL DELETE 'LIBRARY' $! $EXIT: $ EXIT $! $NO_SHARED: $ WRITE SYS$OUTPUT "Failed to delete installed image" $ WRITE SYS$OUTPUT "TCPIP SNMP subagents require ''LIBRARY'" $ GOTO EXIT $!