From df034f6141eca12a67470c570a8118929520418b Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 14 Jun 2003 01:30:32 +0000 Subject: [PATCH] Clean up fix for INCLUDE git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@591 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/functions | 9 ++++----- Shorewall/shorewall | 6 ++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Shorewall/functions b/Shorewall/functions index f2cdaa553..621a7cf38 100755 --- a/Shorewall/functions +++ b/Shorewall/functions @@ -83,14 +83,15 @@ find_display() # $1 = zone, $2 = name of the zone file [ "x$1" = "x$z" ] && echo $display done } - +# +# This function assumes that the TMP_DIR variable is set and that +# its value named an existing directory. +# determine_zones() { local zonefile=`find_file zones` multi_display=Multi-zone - - [ -z "$TMP_DIR" ] && TMP_DIR=/tmp strip_file zones $zonefile zones=`find_zones $TMP_DIR/zones` zones=`echo $zones` # Remove extra trash @@ -99,8 +100,6 @@ determine_zones() dsply=`find_display $zone $TMP_DIR/zones` eval ${zone}_display=\$dsply done - - rm -f $TMP_DIR/zones } # diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 28531439a..58f801f97 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -348,8 +348,14 @@ monitor_firewall() # $1 = timeout -- if negative, prompt each time that timeout=$1 fi + TMP_DIR=/tmp/shorewall-$$ + + mkdir $TMP_DIR + qt which awk && { haveawk=Yes; determine_zones; } || haveawk= + rm -rf $TMP_DIR + while true; do display_chains