Cosmetic changes to shorewall-init

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2020-04-20 10:29:36 -07:00
parent 18360471ab
commit 86ebb22dd3
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -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}"