#! /bin/csh -f # # (c) Copyright 1993-1997 Check Point Software Technologies Ltd. # All rights reserved. # # This is proprietary information of Check Point Software Technologies # Ltd., which is provided for informational purposes only and for use # solely in conjunction with the authorized use of Check Point Software # Technologies Ltd. products. The viewing and use of this information is # subject, to the extent appropriate, to the terms and conditions of the # license agreement that authorizes the use of the relevant product. # # # # Usage: fwstop [-proc] # # -proc: kill only user-mode processes if (! $?FWDIR) setenv FWDIR /etc/fw set path = ( $FWDIR/bin /bin /usr/bin /etc /usr/etc ) source ${FWDIR}/scripts/readprod fw kill fwd if ($fw1_firewall) then set dosnmp = `cat $FWDIR/conf/product.conf | grep -i snmp | awk -F\= '{print $2}'` if ("X$dosnmp" == "X") set dosnmp = 0 if ($dosnmp) then fw kill snmpd endif endif if ($fw1_management) then fw kill fwm fw kill fwalert >& /dev/null endif if ($fw1_firewall == 0) goto no_modunload if ($fw1_auth) then fw kill in.ahttpd >& /dev/null fw kill in.atelnetd >& /dev/null fw kill in.arlogind >& /dev/null fw kill in.aftpd >& /dev/null fw kill in.asmtpd >& /dev/null endif fw kill in.aclientd >& /dev/null fw kill in.ahclientd >& /dev/null fw kill in.lhttpd >& /dev/null if ("X$1" == "X-proc") goto no_modunload if (-f /kernel/genunix || -f /kernel/unix || -f /hp-ux || -f /stand/vmunix) then fw unload all.all fw ctl uninstall goto no_modunload endif if (-f /usr/lib/drivers/netinet) then fw unload all.all fw ctl uninstall $FWDIR/modules/fw_cfg -u goto no_modunload endif if (-f /kernel) then # # Freebsd # /sbin/modunload -n fw1_mod >& /dev/null if ($status != 0) then echo 'fwstop: Module not loaded' exit 1 endif exit 0 endif set id = `modstat | awk 'BEGIN { found = 1; } { for(i = 2; i