mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-25 12:13:29 +02:00
Cosmetic changes to shorewall-init
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
18360471ab
commit
86ebb22dd3
@ -25,6 +25,7 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# set the STATEDIR variable
|
# set the STATEDIR variable
|
||||||
|
|
||||||
setstatedir() {
|
setstatedir() {
|
||||||
local statedir
|
local statedir
|
||||||
if [ -f ${CONFDIR}/${PRODUCT}/vardir ]; then
|
if [ -f ${CONFDIR}/${PRODUCT}/vardir ]; then
|
||||||
@ -59,8 +60,9 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Initialize the firewall
|
# Initialize the firewalls
|
||||||
shorewall_start () {
|
|
||||||
|
shorewall_init_start () {
|
||||||
local PRODUCT
|
local PRODUCT
|
||||||
local STATEDIR
|
local STATEDIR
|
||||||
|
|
||||||
@ -86,12 +88,14 @@ shorewall_start () {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clear the firewall
|
# Clear the firewalls
|
||||||
shorewall_stop () {
|
|
||||||
|
shorewall_init_stop () {
|
||||||
local PRODUCT
|
local PRODUCT
|
||||||
local STATEDIR
|
local STATEDIR
|
||||||
|
|
||||||
printf "Clearing \"Shorewall-based firewalls\": "
|
printf "Clearing \"Shorewall-based firewalls\": "
|
||||||
|
|
||||||
for PRODUCT in $PRODUCTS; do
|
for PRODUCT in $PRODUCTS; do
|
||||||
if setstatedir; then
|
if setstatedir; then
|
||||||
#
|
#
|
||||||
@ -119,10 +123,10 @@ shorewall_stop () {
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
shorewall_start
|
shorewall_init_start
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
shorewall_stop
|
shorewall_init_stop
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop}"
|
echo "Usage: $0 {start|stop}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user