mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 03:59:16 +01:00
Move open_close_setup() inside open_close_command()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
c5ef3fd905
commit
52e7efc666
@ -2086,24 +2086,24 @@ delete_command() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
open_close_setup() {
|
|
||||||
[ -n "$g_nolock" ] || mutex_on
|
|
||||||
|
|
||||||
if ! product_is_started ; then
|
|
||||||
[ -n "$g_nolock" ] || mutex_off
|
|
||||||
fatal_error "The $COMMAND command requires the firewall to be running"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! chain_exists dynamic; then
|
|
||||||
[ -n "$g_nolock" ] || mutex_off
|
|
||||||
fatal_error "The $COMMAND command requires DYNAMIC_BLACKLIST=Yes in the running configuration"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
open_close_command() {
|
open_close_command() {
|
||||||
local command
|
local command
|
||||||
local desc
|
local desc
|
||||||
|
|
||||||
|
open_close_setup() {
|
||||||
|
[ -n "$g_nolock" ] || mutex_on
|
||||||
|
|
||||||
|
if ! product_is_started ; then
|
||||||
|
[ -n "$g_nolock" ] || mutex_off
|
||||||
|
fatal_error "The $COMMAND command requires the firewall to be running"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! chain_exists dynamic; then
|
||||||
|
[ -n "$g_nolock" ] || mutex_off
|
||||||
|
fatal_error "The $COMMAND command requires DYNAMIC_BLACKLIST=Yes in the running configuration"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
[ $# -le 4 ] || fatal_error "Too many parameters"
|
[ $# -le 4 ] || fatal_error "Too many parameters"
|
||||||
|
|
||||||
if [ $COMMAND = open ]; then
|
if [ $COMMAND = open ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user