mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-11 08:08:12 +01:00
Globalize shorewall_is_started()
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2443 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
f73b41925f
commit
3f748212d6
@ -8477,7 +8477,7 @@ do_initialize() {
|
||||
TMP_DIR=
|
||||
ALL_INTERFACES=
|
||||
ROUTEMARK_INTERFACES=
|
||||
ROUTEMARK=256
|
||||
IPSECMARK=256
|
||||
PROVIDERS=
|
||||
CRITICALHOSTS=
|
||||
IPSECFILE=
|
||||
@ -8749,7 +8749,7 @@ case "$COMMAND" in
|
||||
[ $# -ne 1 ] && usage
|
||||
do_initialize
|
||||
my_mutex_on
|
||||
if qt $IPTABLES -L shorewall -n ; then
|
||||
if shorewall_is_started ; then
|
||||
[ -n "$SUBSYSLOCK" ] && touch $SUBSYSLOCK
|
||||
echo "Shorewall Already Started"
|
||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||
@ -8764,7 +8764,7 @@ case "$COMMAND" in
|
||||
[ $# -ne 1 ] && usage
|
||||
do_initialize
|
||||
my_mutex_on
|
||||
if qt $IPTABLES -L shorewall -n ; then
|
||||
if shorewall_is_started; then
|
||||
define_firewall "Restart"
|
||||
else
|
||||
echo "Shorewall Not Currently Running"
|
||||
@ -8779,7 +8779,7 @@ case "$COMMAND" in
|
||||
[ $# -ne 1 ] && usage
|
||||
do_initialize
|
||||
my_mutex_on
|
||||
if ! qt $IPTABLES -L shorewall -n ; then
|
||||
if ! shorewall_is_started ; then
|
||||
echo "Shorewall Not Started"
|
||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||
my_mutex_off
|
||||
@ -8797,7 +8797,7 @@ case "$COMMAND" in
|
||||
[ $# -ne 1 ] && usage
|
||||
do_initialize
|
||||
my_mutex_on
|
||||
if ! qt $IPTABLES -L shorewall -n ; then
|
||||
if ! shorewall_is_started ; then
|
||||
echo "Shorewall Not Started"
|
||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||
my_mutex_off
|
||||
@ -8828,7 +8828,7 @@ case "$COMMAND" in
|
||||
[ $# -lt 3 ] && usage
|
||||
do_initialize
|
||||
my_mutex_on
|
||||
if ! qt $IPTABLES -L shorewall -n ; then
|
||||
if ! shorewall_is_started ; then
|
||||
echo "Shorewall Not Started"
|
||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||
my_mutex_off
|
||||
@ -8843,7 +8843,7 @@ case "$COMMAND" in
|
||||
[ $# -lt 3 ] && usage
|
||||
do_initialize
|
||||
my_mutex_on
|
||||
if ! qt $IPTABLES -L shorewall -n ; then
|
||||
if ! shorewall_is_started ; then
|
||||
echo "Shorewall Not Started"
|
||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||
my_mutex_off
|
||||
|
@ -70,6 +70,13 @@ qt()
|
||||
"$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
#
|
||||
# Determine if Shorewall is "running"
|
||||
#
|
||||
shorewall_is_started() {
|
||||
qt $IPTABLES -L shorewall -n
|
||||
}
|
||||
|
||||
#
|
||||
# Perform variable substitution on the passed argument and echo the result
|
||||
#
|
||||
|
@ -239,13 +239,6 @@ get_config() {
|
||||
|
||||
}
|
||||
|
||||
#
|
||||
# Determine if Shorewall is "running"
|
||||
#
|
||||
shorewall_is_started() {
|
||||
qt $IPTABLES -L shorewall -n
|
||||
}
|
||||
|
||||
#
|
||||
# Clear descriptor 1 if it is a terminal
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user