| # config: /etc/sysconfig/ipfilter |
| CONFIG=/etc/sysconfig/ipfilter |
| IPNATCONF=/etc/ipnat.conf |
| IPPOOLCONF=/etc/ippool.conf |
| # Source function library. |
| if [ ! -f /etc/ipf.conf -a ! -f /etc/ipnat.conf ] ; then |
| logger -t $2 -p $LOGPRI "$3" |
| if [ ${rc} -ne 0 ] ; then |
| echo -n $"Starting IPFilter: " |
| ipfdev=`awk ' /ipf/ { print $1; } ' /proc/devices` |
| for i in ipl ipnat ipstate ipauth ipsync ipscan iplookup; do |
| mknod /dev/$i c $ipfdev $minor |
| if [ -f $IPFCONF ] ; then |
| msg=`/sbin/ipf -f $IPFCONF 2>&1` |
| if [ $rc -eq 0 -a -f $IPNATCONF ] ; then |
| msg=`/sbin/ipnat -f $IPNATCONF 2>&1` |
| if [ $rc -eq 0 -a -f $IPPOOLCONF ] ; then |
| msg=`/sbin/ippool -f $IPPOOLCONF 2>&1` |
| echo -n $"Shutting down IPFilter: " |
| [ $rc -eq 0 ] && /sbin/modprobe -r ipfilter 2>&1 >/dev/null |
| # See how we were called. |
| echo "Usage: ipfilter {start|stop|status|restart|reload}" |