forked from extern/shorewall_code
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
|
. /usr/share/shorewall/shorewallrc
|
||||||
|
|
||||||
vardir=$VARDIR
|
|
||||||
|
|
||||||
# check if shorewall-init is configured or not
|
# check if shorewall-init is configured or not
|
||||||
if [ -f "$SYSCONFDIR/shorewall-init" ]
|
if [ -f "$SYSCONFDIR/shorewall-init" ]
|
||||||
then
|
then
|
||||||
@ -129,7 +127,7 @@ shorewall_start () {
|
|||||||
# Clear the firewall
|
# Clear the firewall
|
||||||
shorewall_stop () {
|
shorewall_stop () {
|
||||||
local PRODUCT
|
local PRODUCT
|
||||||
local VARDIR
|
local STATEDIR
|
||||||
|
|
||||||
echo -n "Clearing \"Shorewall-based firewalls\": "
|
echo -n "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
|
@ -24,8 +24,6 @@ lockfile="/var/lock/subsys/shorewall-init"
|
|||||||
# Source function library.
|
# Source function library.
|
||||||
. /etc/rc.d/init.d/functions
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
vardir=$VARDIR
|
|
||||||
|
|
||||||
# Get startup options (override default)
|
# Get startup options (override default)
|
||||||
OPTIONS=
|
OPTIONS=
|
||||||
|
|
||||||
@ -56,7 +54,7 @@ setstatedir() {
|
|||||||
# Initialize the firewall
|
# Initialize the firewall
|
||||||
start () {
|
start () {
|
||||||
local PRODUCT
|
local PRODUCT
|
||||||
local vardir
|
local STATEDIR
|
||||||
|
|
||||||
if [ -z "$PRODUCTS" ]; then
|
if [ -z "$PRODUCTS" ]; then
|
||||||
echo "No firewalls configured for shorewall-init"
|
echo "No firewalls configured for shorewall-init"
|
||||||
@ -97,7 +95,7 @@ start () {
|
|||||||
# Clear the firewall
|
# Clear the firewall
|
||||||
stop () {
|
stop () {
|
||||||
local PRODUCT
|
local PRODUCT
|
||||||
local vardir
|
local STATEDIR
|
||||||
|
|
||||||
echo -n "Clearing \"Shorewall-based firewalls\": "
|
echo -n "Clearing \"Shorewall-based firewalls\": "
|
||||||
|
|
||||||
|
@ -58,8 +58,6 @@ fi
|
|||||||
#
|
#
|
||||||
. /usr/share/shorewall/shorewallrc
|
. /usr/share/shorewall/shorewallrc
|
||||||
|
|
||||||
vardir=$VARDIR
|
|
||||||
|
|
||||||
# Locate the current PRODUCT's statedir
|
# Locate the current PRODUCT's statedir
|
||||||
setstatedir() {
|
setstatedir() {
|
||||||
local statedir
|
local statedir
|
||||||
@ -102,20 +100,20 @@ shorewall_start () {
|
|||||||
# Clear the firewall
|
# Clear the firewall
|
||||||
shorewall_stop () {
|
shorewall_stop () {
|
||||||
local PRODUCT
|
local PRODUCT
|
||||||
local VARDIR
|
local STATEDIR
|
||||||
|
|
||||||
echo -n "Clearing \"Shorewall-based firewalls\": "
|
echo -n "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
setstatedir
|
setstatedir
|
||||||
|
|
||||||
if [ ! -x ${VARDIR}/firewall ]; then
|
if [ ! -x ${STATEDIR}/firewall ]; then
|
||||||
if [ $PRODUCT = shorewall -o $product = shorewall6 ]; then
|
if [ $PRODUCT = shorewall -o $product = shorewall6 ]; then
|
||||||
${SBINDIR}/$PRODUCT compile
|
${SBINDIR}/$PRODUCT compile
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -x ${VARDIR}/firewall ]; then
|
if [ -x ${STATEDIR}/firewall ]; then
|
||||||
${VARDIR}/firewall clear || exit 1
|
${STATEDIR}/firewall clear || exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -70,8 +70,6 @@ fi
|
|||||||
#
|
#
|
||||||
. /usr/share/shorewall/shorewallrc
|
. /usr/share/shorewall/shorewallrc
|
||||||
|
|
||||||
vardir=$VARDIR
|
|
||||||
|
|
||||||
# set the STATEDIR variable
|
# set the STATEDIR variable
|
||||||
setstatedir() {
|
setstatedir() {
|
||||||
local statedir
|
local statedir
|
||||||
|
@ -42,8 +42,6 @@ setstatedir() {
|
|||||||
#
|
#
|
||||||
. /usr/share/shorewall/shorewallrc
|
. /usr/share/shorewall/shorewallrc
|
||||||
|
|
||||||
vardir=$VARDIR
|
|
||||||
|
|
||||||
# check if shorewall-init is configured or not
|
# check if shorewall-init is configured or not
|
||||||
if [ -f "$SYSCONFDIR/shorewall-init" ]; then
|
if [ -f "$SYSCONFDIR/shorewall-init" ]; then
|
||||||
. $SYSCONFDIR/shorewall-init
|
. $SYSCONFDIR/shorewall-init
|
||||||
@ -91,6 +89,7 @@ shorewall_start () {
|
|||||||
# Clear the firewall
|
# Clear the firewall
|
||||||
shorewall_stop () {
|
shorewall_stop () {
|
||||||
local PRODUCT
|
local PRODUCT
|
||||||
|
local STATEDIR
|
||||||
|
|
||||||
echo -n "Clearing \"Shorewall-based firewalls\": "
|
echo -n "Clearing \"Shorewall-based firewalls\": "
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
|
Loading…
Reference in New Issue
Block a user