diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli
index f5cc717f6..68d917733 100644
--- a/Shorewall-core/lib.cli
+++ b/Shorewall-core/lib.cli
@@ -2881,10 +2881,10 @@ report_capabilities1() {
show_status() {
if product_is_started ; then
- echo "$g_product is running"
+ [ $VERBOSITY -ge 1 ] && echo "$g_product is running"
status=0
else
- echo "$g_product is stopped"
+ [ $VERBOSITY -ge 1 ] && echo "$g_product is stopped"
status=4
fi
@@ -2898,14 +2898,13 @@ show_status() {
else
state=Unknown
fi
- echo "State:$state"
+ [ $VERBOSITY -ge 1 ] && echo "State:$state"
}
status_command() {
- echo "${g_product}-$SHOREWALL_VERSION Status at $g_hostname - $(date)"
- echo
+ [ $VERBOSITY -ge 1 ] && echo "${g_product}-$SHOREWALL_VERSION Status at $g_hostname - $(date)" && echo
show_status
- echo
+ [ $VERBOSITY -ge 1 ] && echo
exit $status
}
diff --git a/Shorewall-lite/manpages/shorewall-lite.xml b/Shorewall-lite/manpages/shorewall-lite.xml
index e8d8524a9..b721f6437 100644
--- a/Shorewall-lite/manpages/shorewall-lite.xml
+++ b/Shorewall-lite/manpages/shorewall-lite.xml
@@ -1086,6 +1086,23 @@
+
+ EXIT STATUS
+
+ In general, when a command succeeds, status 0 is returned; when the
+ command fails, a non-zero status is returned.
+
+ The status command returns exit status as
+ follows:
+
+ 0 - Firewall is started.
+
+ 3 - Firewall is stopped or cleared
+
+ 4 - Unknown state; usually means that the firewall has never been
+ started.
+
+
FILES
diff --git a/Shorewall/Perl/prog.footer b/Shorewall/Perl/prog.footer
index 7003a51b0..5860e7087 100644
--- a/Shorewall/Perl/prog.footer
+++ b/Shorewall/Perl/prog.footer
@@ -321,13 +321,12 @@ case "$COMMAND" in
;;
status)
[ $# -ne 1 ] && usage 2
- echo "$g_product-$SHOREWALL_VERSION Status at $(hostname) - $(date)"
- echo
+ [ $VERBOSITY -ge 1 ] && echo "$g_product-$SHOREWALL_VERSION Status at $(hostname) - $(date)" && echo
if product_is_started; then
- echo "$g_product is running"
+ [ $VERBOSITY -ge 1 ] && echo "$g_product is running"
status=0
else
- echo "$g_product is stopped"
+ [ $VERBOSITY -ge 1 ] && echo "$g_product is stopped"
status=4
fi
@@ -341,8 +340,7 @@ case "$COMMAND" in
else
state=Unknown
fi
- echo "State:$state"
- echo
+ [ $VERBOSITY -ge 1 ] && echo "State:$state" && echo
;;
up|down)
[ $# -eq 1 ] && exit 0
diff --git a/Shorewall/manpages/shorewall.xml b/Shorewall/manpages/shorewall.xml
index b954a7165..a710cfaf9 100644
--- a/Shorewall/manpages/shorewall.xml
+++ b/Shorewall/manpages/shorewall.xml
@@ -1793,6 +1793,23 @@
+
+ EXIT STATUS
+
+ In general, when a command succeeds, status 0 is returned; when the
+ command fails, a non-zero status is returned.
+
+ The status command returns exit status as
+ follows:
+
+ 0 - Firewall is started.
+
+ 3 - Firewall is stopped or cleared
+
+ 4 - Unknown state; usually means that the firewall has never been
+ started.
+
+
FILES
diff --git a/Shorewall6-lite/manpages/shorewall6-lite.xml b/Shorewall6-lite/manpages/shorewall6-lite.xml
index 3d409e3d9..4ee06b48b 100644
--- a/Shorewall6-lite/manpages/shorewall6-lite.xml
+++ b/Shorewall6-lite/manpages/shorewall6-lite.xml
@@ -1085,9 +1085,20 @@
- FILES
+ EXIT STATUS
- /etc/shorewall6-lite/
+ In general, when a command succeeds, status 0 is returned; when the
+ command fails, a non-zero status is returned.
+
+ The status command returns exit status as
+ follows:
+
+ 0 - Firewall is started.
+
+ 3 - Firewall is stopped or cleared
+
+ 4 - Unknown state; usually means that the firewall has never been
+ started.
diff --git a/Shorewall6/manpages/shorewall6.xml b/Shorewall6/manpages/shorewall6.xml
index 9f3161e42..e86d8b1fc 100644
--- a/Shorewall6/manpages/shorewall6.xml
+++ b/Shorewall6/manpages/shorewall6.xml
@@ -1630,9 +1630,20 @@
- FILES
+ EXIT STATUS
- /etc/shorewall6/
+ In general, when a command succeeds, status 0 is returned; when the
+ command fails, a non-zero status is returned.
+
+ The status command returns exit status as
+ follows:
+
+ 0 - Firewall is started.
+
+ 3 - Firewall is stopped or cleared
+
+ 4 - Unknown state; usually means that the firewall has never been
+ started.