mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 08:03:11 +01:00
Fix 'hits' output with space delimiters in /etc/services
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4241 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
c741ab9e43
commit
7c9ab1a2eb
@ -1,3 +1,5 @@
|
|||||||
Changes in 3.3.0
|
Changes in 3.3.0
|
||||||
|
|
||||||
1) Fix output of 'hits' command under busybox 1.2.0.
|
1) Fix output of 'hits' command under busybox 1.2.0.
|
||||||
|
|
||||||
|
2) Fixed output of 'hits' with spaces as delimiters in /etc/services.
|
||||||
|
@ -5,6 +5,10 @@ Problems Corrected in 3.3.0
|
|||||||
1) The output formating of the 'hits' command under BusyBox 1.2.0 has
|
1) The output formating of the 'hits' command under BusyBox 1.2.0 has
|
||||||
been corrected.
|
been corrected.
|
||||||
|
|
||||||
|
2) The output of the 'hits' command was previously scrambled if
|
||||||
|
/etc/services contained spaces as column delimiters rather than
|
||||||
|
tabs.
|
||||||
|
|
||||||
Other changes in 3.3.0
|
Other changes in 3.3.0
|
||||||
|
|
||||||
None.
|
None.
|
||||||
|
@ -1350,7 +1350,7 @@ case "$COMMAND" in
|
|||||||
grep "$LOGFORMAT.*DPT" $LOGFILE | sed 's/\(.*DPT=\)\([0-9]\{1,5\}\)\(.*\)/\2/' | sort | uniq -c | sort -rn | \
|
grep "$LOGFORMAT.*DPT" $LOGFILE | sed 's/\(.*DPT=\)\([0-9]\{1,5\}\)\(.*\)/\2/' | sort | uniq -c | sort -rn | \
|
||||||
while read count port ; do
|
while read count port ; do
|
||||||
# List all services defined for the given port
|
# List all services defined for the given port
|
||||||
srv=$(grep "^[^#].*\\b$port/" /etc/services | cut -f 1 | sort -u)
|
srv=$(grep "^[^#].*\\b$port/" /etc/services | cut -f 1 | cut -f 1 -d' ' | sort -u)
|
||||||
srv=$(echo $srv | sed 's/ /,/g')
|
srv=$(echo $srv | sed 's/ /,/g')
|
||||||
|
|
||||||
if [ -n "$srv" ] ; then
|
if [ -n "$srv" ] ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user