mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 06:10:42 +01:00
Yet more improvements to Shorewall-init
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
494cdfb73c
commit
3c1a2d1b41
@ -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
|
||||
|
@ -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\": "
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -70,8 +70,6 @@ fi
|
||||
#
|
||||
. /usr/share/shorewall/shorewallrc
|
||||
|
||||
vardir=$VARDIR
|
||||
|
||||
# set the STATEDIR variable
|
||||
setstatedir() {
|
||||
local statedir
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user