Yet more improvements to Shorewall-init

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-08-24 09:37:56 -07:00
parent 494cdfb73c
commit 3c1a2d1b41
5 changed files with 8 additions and 17 deletions

View File

@ -81,8 +81,6 @@ setstatedir() {
#
. /usr/share/shorewall/shorewallrc
vardir=$VARDIR
# check if shorewall-init is configured or not
if [ -f "$SYSCONFDIR/shorewall-init" ]
then
@ -129,7 +127,7 @@ shorewall_start () {
# Clear the firewall
shorewall_stop () {
local PRODUCT
local VARDIR
local STATEDIR
echo -n "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do

View File

@ -24,8 +24,6 @@ lockfile="/var/lock/subsys/shorewall-init"
# Source function library.
. /etc/rc.d/init.d/functions
vardir=$VARDIR
# Get startup options (override default)
OPTIONS=
@ -56,7 +54,7 @@ setstatedir() {
# Initialize the firewall
start () {
local PRODUCT
local vardir
local STATEDIR
if [ -z "$PRODUCTS" ]; then
echo "No firewalls configured for shorewall-init"
@ -97,7 +95,7 @@ start () {
# Clear the firewall
stop () {
local PRODUCT
local vardir
local STATEDIR
echo -n "Clearing \"Shorewall-based firewalls\": "

View File

@ -58,8 +58,6 @@ fi
#
. /usr/share/shorewall/shorewallrc
vardir=$VARDIR
# Locate the current PRODUCT's statedir
setstatedir() {
local statedir
@ -102,20 +100,20 @@ shorewall_start () {
# Clear the firewall
shorewall_stop () {
local PRODUCT
local VARDIR
local STATEDIR
echo -n "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do
setstatedir
if [ ! -x ${VARDIR}/firewall ]; then
if [ ! -x ${STATEDIR}/firewall ]; then
if [ $PRODUCT = shorewall -o $product = shorewall6 ]; then
${SBINDIR}/$PRODUCT compile
fi
fi
if [ -x ${VARDIR}/firewall ]; then
${VARDIR}/firewall clear || exit 1
if [ -x ${STATEDIR}/firewall ]; then
${STATEDIR}/firewall clear || exit 1
fi
done

View File

@ -70,8 +70,6 @@ fi
#
. /usr/share/shorewall/shorewallrc
vardir=$VARDIR
# set the STATEDIR variable
setstatedir() {
local statedir

View File

@ -42,8 +42,6 @@ setstatedir() {
#
. /usr/share/shorewall/shorewallrc
vardir=$VARDIR
# check if shorewall-init is configured or not
if [ -f "$SYSCONFDIR/shorewall-init" ]; then
. $SYSCONFDIR/shorewall-init
@ -91,6 +89,7 @@ shorewall_start () {
# Clear the firewall
shorewall_stop () {
local PRODUCT
local STATEDIR
echo -n "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do