mirror of
https://gitlab.com/shorewall/code.git
synced 2025-05-29 22:18:48 +02:00
Correct several bugs in the VERBOSITY overhaul
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
53c73bc8e9
commit
3ba797cb14
@ -189,7 +189,7 @@ our %config;
|
|||||||
#
|
#
|
||||||
# Config options and global settings that are to be copied to output script
|
# Config options and global settings that are to be copied to output script
|
||||||
#
|
#
|
||||||
our @propagateconfig = qw/ DISABLE_IPV6 MODULESDIR MODULE_SUFFIX LOAD_HELPERS_ONLY SUBSYSLOCK VERBOSITY LOG_VERBOSITY/;
|
our @propagateconfig = qw/ DISABLE_IPV6 MODULESDIR MODULE_SUFFIX LOAD_HELPERS_ONLY SUBSYSLOCK LOG_VERBOSITY/;
|
||||||
#
|
#
|
||||||
# From parsing the capabilities file or detecting capabilities
|
# From parsing the capabilities file or detecting capabilities
|
||||||
#
|
#
|
||||||
|
@ -14,6 +14,8 @@ usage() {
|
|||||||
#
|
#
|
||||||
# Start trace if first arg is "debug" or "trace"
|
# Start trace if first arg is "debug" or "trace"
|
||||||
#
|
#
|
||||||
|
[ -n "${PRODUCT:=Shorewall}" ]
|
||||||
|
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
if [ "x$1" = "xtrace" ]; then
|
if [ "x$1" = "xtrace" ]; then
|
||||||
set -x
|
set -x
|
||||||
@ -24,7 +26,7 @@ if [ $# -gt 1 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$VERBOSITY" ] && [ -n "$VERBOSE" ] & VERBOSITY=$VERBOSE
|
[ -z "$VERBOSITY" ] && [ -n "$VERBOSE" ] && VERBOSITY=$VERBOSE
|
||||||
|
|
||||||
initialize
|
initialize
|
||||||
|
|
||||||
@ -109,8 +111,6 @@ done
|
|||||||
|
|
||||||
COMMAND="$1"
|
COMMAND="$1"
|
||||||
|
|
||||||
[ -n "${PRODUCT:=Shorewall}" ]
|
|
||||||
|
|
||||||
case "$COMMAND" in
|
case "$COMMAND" in
|
||||||
start)
|
start)
|
||||||
[ $# -ne 1 ] && usage 2
|
[ $# -ne 1 ] && usage 2
|
||||||
|
@ -14,6 +14,8 @@ usage() {
|
|||||||
#
|
#
|
||||||
# Start trace if first arg is "debug" or "trace"
|
# Start trace if first arg is "debug" or "trace"
|
||||||
#
|
#
|
||||||
|
[ -n "${PRODUCT:=Shorewall6}" ]
|
||||||
|
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
if [ "x$1" = "xtrace" ]; then
|
if [ "x$1" = "xtrace" ]; then
|
||||||
set -x
|
set -x
|
||||||
@ -24,7 +26,7 @@ if [ $# -gt 1 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$VERBOSITY" ] && [ -n "$VERBOSE" ] & VERBOSITY=$VERBOSE
|
[ -z "$VERBOSITY" ] && [ -n "$VERBOSE" ] && VERBOSITY=$VERBOSE
|
||||||
|
|
||||||
initialize
|
initialize
|
||||||
|
|
||||||
@ -106,51 +108,6 @@ done
|
|||||||
|
|
||||||
COMMAND="$1"
|
COMMAND="$1"
|
||||||
|
|
||||||
[ -n "${PRODUCT:=Shorewall6}" ]
|
|
||||||
|
|
||||||
kernel=$(printf "%2d%02d%02d" $(uname -r 2> /dev/null | sed -e 's/-.*//' -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/g'))
|
|
||||||
if [ $kernel -lt 20624 ]; then
|
|
||||||
error_message "ERROR: $PRODUCT requires Linux kernel 2.6.24 or later"
|
|
||||||
status=2
|
|
||||||
else
|
|
||||||
case "$COMMAND" in
|
|
||||||
start)
|
|
||||||
[ $# -ne 1 ] && usage 2
|
|
||||||
if shorewall6_is_started; then
|
|
||||||
error_message "$PRODUCT is already Running"
|
|
||||||
status=0
|
|
||||||
else
|
|
||||||
progress_message3 "Starting $PRODUCT...."
|
|
||||||
detect_configuration
|
|
||||||
define_firewall
|
|
||||||
status=$?
|
|
||||||
[ -n "$SUBSYSLOCK" -a $status -eq 0 ] && touch $SUBSYSLOCK
|
|
||||||
progress_message3 "done."
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
[ $# -ne 1 ] && usage 2
|
|
||||||
progress_message3 "Stopping $PRODUCT...."
|
|
||||||
detect_configuration
|
|
||||||
stop_firewall
|
|
||||||
status=0
|
|
||||||
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK *)
|
|
||||||
usage 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
finished=1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
COMMAND="$1"
|
|
||||||
|
|
||||||
[ -n "${PRODUCT:=Shorewall6}" ]
|
|
||||||
|
|
||||||
kernel=$(printf "%2d%02d%02d" $(uname -r 2> /dev/null | sed -e 's/-.*//' -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/g'))
|
kernel=$(printf "%2d%02d%02d" $(uname -r 2> /dev/null | sed -e 's/-.*//' -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/g'))
|
||||||
if [ $kernel -lt 20624 ]; then
|
if [ $kernel -lt 20624 ]; then
|
||||||
error_message "ERROR: $PRODUCT requires Linux kernel 2.6.24 or later"
|
error_message "ERROR: $PRODUCT requires Linux kernel 2.6.24 or later"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user