2006-03-01 17:46:19 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# chkconfig: 2345 25 90
|
|
|
|
#
|
|
|
|
# description: Firewall script for configuring Netfilter generated by \
|
|
|
|
# the Shoreline Firewall.
|
2006-03-03 00:31:27 +01:00
|
|
|
#
|
|
|
|
# Options are:
|
|
|
|
#
|
|
|
|
# -n Don't alter Routing
|
|
|
|
# -v and -q Standard Shorewall Verbosity control
|
|
|
|
#
|
|
|
|
# Commands are:
|
|
|
|
#
|
|
|
|
# start Starts the firewall
|
|
|
|
# restart Restarts the firewall
|
|
|
|
# reload Reload the firewall
|
|
|
|
# clear Removes all firewall rules
|
|
|
|
# stop Stops the firewall
|
|
|
|
# status Displays firewall status
|
|
|
|
# version Displays the version of Shorewall that
|
|
|
|
# generated this program
|
2006-03-01 17:46:19 +01:00
|
|
|
|
|
|
|
# Source function library
|
|
|
|
if [ -f /etc/init.d/functions ]; then
|
|
|
|
. /etc/init.d/functions
|
|
|
|
elif [ -f /etc/rc.d/init.d/functions ]; then
|
|
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Source networking configuration.
|
|
|
|
. /etc/sysconfig/network
|
|
|
|
|
|
|
|
# Check that networking is up.
|
|
|
|
[ ${NETWORKING} = "no" ] && exit 0
|
|
|
|
|
|
|
|
# This is our service name
|
|
|
|
BASENAME=$(basename $0)
|
|
|
|
if [ -L $0 ]; then
|
|
|
|
BASENAME=$(find $0 -name $BASENAME -printf %l)
|
|
|
|
BASENAME=$(basename $BASENAME)
|
|
|
|
fi
|
|
|
|
|