forked from extern/shorewall_code
Add -v option to /sbin/shorewall
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2053 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
134019c40e
commit
ea3fa8710e
@ -17,6 +17,8 @@ Changes in 2.2.4
|
|||||||
|
|
||||||
8) Add 'shorewall show capabilities'
|
8) Add 'shorewall show capabilities'
|
||||||
|
|
||||||
|
8) Add '-v' option
|
||||||
|
|
||||||
Changes in 2.2.3
|
Changes in 2.2.3
|
||||||
|
|
||||||
1) Added the 'continue' extension script.
|
1) Added the 'continue' extension script.
|
||||||
|
@ -151,6 +151,12 @@ New Features in version 2.2.4
|
|||||||
Owner Match: Available
|
Owner Match: Available
|
||||||
gateway:~#
|
gateway:~#
|
||||||
|
|
||||||
|
6) A "-v" option has been added to /sbin/shorewall. Currently, this
|
||||||
|
option only affects the "show log" command (e.g., "shorewall -v show
|
||||||
|
log") and the "monitor" command. In these commands, it causes the
|
||||||
|
MAC address in the log message (if any) to be displayed. As
|
||||||
|
previously, when "-v" is omitted, the MAC address is suppressed.
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
Problems corrected in version 2.2.3
|
Problems corrected in version 2.2.3
|
||||||
|
|
||||||
|
@ -354,11 +354,18 @@ packet_log() # $1 = number of messages
|
|||||||
|
|
||||||
[ -n "$realtail" ] && options="-n$1"
|
[ -n "$realtail" ] && options="-n$1"
|
||||||
|
|
||||||
grep "${LOGFORMAT}" $LOGFILE | \
|
if [ -n "$VERBOSE" ]; then
|
||||||
sed s/" kernel:"// | \
|
grep "${LOGFORMAT}" $LOGFILE | \
|
||||||
sed s/" $host $LOGFORMAT"/" "/ | \
|
sed s/" kernel:"// | \
|
||||||
sed 's/MAC=.* SRC=/SRC=/' | \
|
sed s/" $host $LOGFORMAT"/" "/ | \
|
||||||
tail $options
|
tail $options
|
||||||
|
else
|
||||||
|
grep "${LOGFORMAT}" $LOGFILE | \
|
||||||
|
sed s/" kernel:"// | \
|
||||||
|
sed s/" $host $LOGFORMAT"/" "/ | \
|
||||||
|
sed 's/MAC=.* SRC=/SRC=/' | \
|
||||||
|
tail $options
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -597,7 +604,7 @@ help()
|
|||||||
#
|
#
|
||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
echo "Usage: $(basename $0) [debug|trace] [nolock] [-c <directory>] [ -x ] [ -q ] [ -f ] <command>"
|
echo "Usage: $(basename $0) [debug|trace] [nolock] [ -x ] [ -q ] [ -f ] [ -v ] <command>"
|
||||||
echo "where <command> is one of:"
|
echo "where <command> is one of:"
|
||||||
echo " add <interface>[:{<bridge-port>[:<host>]|<host>}[,...]] ... <zone>"
|
echo " add <interface>[:{<bridge-port>[:<host>]|<host>}[,...]] ... <zone>"
|
||||||
echo " allow <address> ..."
|
echo " allow <address> ..."
|
||||||
@ -625,7 +632,6 @@ usage() # $1 = exit status
|
|||||||
echo " try <directory> [ <timeout> ]"
|
echo " try <directory> [ <timeout> ]"
|
||||||
echo " version"
|
echo " version"
|
||||||
echo
|
echo
|
||||||
echo "The -c and -f options may not be specified with a <directory> in the start, restart and check commands"
|
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -666,6 +672,7 @@ SHOREWALL_DIR=
|
|||||||
QUIET=
|
QUIET=
|
||||||
IPT_OPTIONS="-nv"
|
IPT_OPTIONS="-nv"
|
||||||
FAST=
|
FAST=
|
||||||
|
VERBOSE=
|
||||||
|
|
||||||
done=0
|
done=0
|
||||||
|
|
||||||
@ -707,6 +714,10 @@ while [ $done -eq 0 ]; do
|
|||||||
FAST=Yes
|
FAST=Yes
|
||||||
option=${option#f}
|
option=${option#f}
|
||||||
;;
|
;;
|
||||||
|
v*)
|
||||||
|
VERBOSE=Yes
|
||||||
|
option=${option#v}
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage 1
|
usage 1
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user