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:
teastep 2005-08-01 20:35:28 +00:00
parent f73b41925f
commit 3f748212d6
3 changed files with 14 additions and 14 deletions

View File

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

View File

@ -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
#

View File

@ -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
#