Fix 'hits' output with space delimiters in /etc/services

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4239 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-07-19 13:09:51 +00:00
parent bba0d268e9
commit da44e2a6bd
3 changed files with 10 additions and 3 deletions

View File

@ -1,9 +1,12 @@
Changes in 3.3.0
1) Remove dynamic zone capability.
1) Remove dynamic zone capability.
2) Fixed output of 'hits' command under busybox 1.2.0.
2) Fixed output of 'hits' command under busybox 1.2.0.
3) Remove requirement for extended marks with 'track'.
4) Fixed output of 'hits' with spaces as delimiters in /etc/services.

View File

@ -36,6 +36,10 @@ Problems Corrected in 3.3.0
1) The output formating of the 'hits' command under BusyBox 1.2.0 has
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
1) Support for dynamic zones (DYNAMIC_ZONES=Yes in shorewall.conf and

View File

@ -1747,7 +1747,7 @@ case "$COMMAND" in
grep "$LOGFORMAT.*DPT" $LOGFILE | sed 's/\(.*DPT=\)\([0-9]\{1,5\}\)\(.*\)/\2/' | sort | uniq -c | sort -rn | \
while read count port ; do
# 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')
if [ -n "$srv" ] ; then