mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 19:51:40 +02: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=
|
TMP_DIR=
|
||||||
ALL_INTERFACES=
|
ALL_INTERFACES=
|
||||||
ROUTEMARK_INTERFACES=
|
ROUTEMARK_INTERFACES=
|
||||||
ROUTEMARK=256
|
IPSECMARK=256
|
||||||
PROVIDERS=
|
PROVIDERS=
|
||||||
CRITICALHOSTS=
|
CRITICALHOSTS=
|
||||||
IPSECFILE=
|
IPSECFILE=
|
||||||
@ -8749,7 +8749,7 @@ case "$COMMAND" in
|
|||||||
[ $# -ne 1 ] && usage
|
[ $# -ne 1 ] && usage
|
||||||
do_initialize
|
do_initialize
|
||||||
my_mutex_on
|
my_mutex_on
|
||||||
if qt $IPTABLES -L shorewall -n ; then
|
if shorewall_is_started ; then
|
||||||
[ -n "$SUBSYSLOCK" ] && touch $SUBSYSLOCK
|
[ -n "$SUBSYSLOCK" ] && touch $SUBSYSLOCK
|
||||||
echo "Shorewall Already Started"
|
echo "Shorewall Already Started"
|
||||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||||
@ -8764,7 +8764,7 @@ case "$COMMAND" in
|
|||||||
[ $# -ne 1 ] && usage
|
[ $# -ne 1 ] && usage
|
||||||
do_initialize
|
do_initialize
|
||||||
my_mutex_on
|
my_mutex_on
|
||||||
if qt $IPTABLES -L shorewall -n ; then
|
if shorewall_is_started; then
|
||||||
define_firewall "Restart"
|
define_firewall "Restart"
|
||||||
else
|
else
|
||||||
echo "Shorewall Not Currently Running"
|
echo "Shorewall Not Currently Running"
|
||||||
@ -8779,7 +8779,7 @@ case "$COMMAND" in
|
|||||||
[ $# -ne 1 ] && usage
|
[ $# -ne 1 ] && usage
|
||||||
do_initialize
|
do_initialize
|
||||||
my_mutex_on
|
my_mutex_on
|
||||||
if ! qt $IPTABLES -L shorewall -n ; then
|
if ! shorewall_is_started ; then
|
||||||
echo "Shorewall Not Started"
|
echo "Shorewall Not Started"
|
||||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||||
my_mutex_off
|
my_mutex_off
|
||||||
@ -8797,7 +8797,7 @@ case "$COMMAND" in
|
|||||||
[ $# -ne 1 ] && usage
|
[ $# -ne 1 ] && usage
|
||||||
do_initialize
|
do_initialize
|
||||||
my_mutex_on
|
my_mutex_on
|
||||||
if ! qt $IPTABLES -L shorewall -n ; then
|
if ! shorewall_is_started ; then
|
||||||
echo "Shorewall Not Started"
|
echo "Shorewall Not Started"
|
||||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||||
my_mutex_off
|
my_mutex_off
|
||||||
@ -8828,7 +8828,7 @@ case "$COMMAND" in
|
|||||||
[ $# -lt 3 ] && usage
|
[ $# -lt 3 ] && usage
|
||||||
do_initialize
|
do_initialize
|
||||||
my_mutex_on
|
my_mutex_on
|
||||||
if ! qt $IPTABLES -L shorewall -n ; then
|
if ! shorewall_is_started ; then
|
||||||
echo "Shorewall Not Started"
|
echo "Shorewall Not Started"
|
||||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||||
my_mutex_off
|
my_mutex_off
|
||||||
@ -8843,7 +8843,7 @@ case "$COMMAND" in
|
|||||||
[ $# -lt 3 ] && usage
|
[ $# -lt 3 ] && usage
|
||||||
do_initialize
|
do_initialize
|
||||||
my_mutex_on
|
my_mutex_on
|
||||||
if ! qt $IPTABLES -L shorewall -n ; then
|
if ! shorewall_is_started ; then
|
||||||
echo "Shorewall Not Started"
|
echo "Shorewall Not Started"
|
||||||
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
[ -n "$TMP_DIR" ] && rm -rf $TMP_DIR
|
||||||
my_mutex_off
|
my_mutex_off
|
||||||
|
@ -70,6 +70,13 @@ qt()
|
|||||||
"$@" >/dev/null 2>&1
|
"$@" >/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
|
# 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
|
# Clear descriptor 1 if it is a terminal
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user