Clean up fix for INCLUDE

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@591 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2003-06-14 01:30:32 +00:00
parent 51a7030fdb
commit df034f6141
2 changed files with 10 additions and 5 deletions

View File

@ -83,14 +83,15 @@ find_display() # $1 = zone, $2 = name of the zone file
[ "x$1" = "x$z" ] && echo $display [ "x$1" = "x$z" ] && echo $display
done done
} }
#
# This function assumes that the TMP_DIR variable is set and that
# its value named an existing directory.
#
determine_zones() determine_zones()
{ {
local zonefile=`find_file zones` local zonefile=`find_file zones`
multi_display=Multi-zone multi_display=Multi-zone
[ -z "$TMP_DIR" ] && TMP_DIR=/tmp
strip_file zones $zonefile strip_file zones $zonefile
zones=`find_zones $TMP_DIR/zones` zones=`find_zones $TMP_DIR/zones`
zones=`echo $zones` # Remove extra trash zones=`echo $zones` # Remove extra trash
@ -99,8 +100,6 @@ determine_zones()
dsply=`find_display $zone $TMP_DIR/zones` dsply=`find_display $zone $TMP_DIR/zones`
eval ${zone}_display=\$dsply eval ${zone}_display=\$dsply
done done
rm -f $TMP_DIR/zones
} }
# #

View File

@ -348,8 +348,14 @@ monitor_firewall() # $1 = timeout -- if negative, prompt each time that
timeout=$1 timeout=$1
fi fi
TMP_DIR=/tmp/shorewall-$$
mkdir $TMP_DIR
qt which awk && { haveawk=Yes; determine_zones; } || haveawk= qt which awk && { haveawk=Yes; determine_zones; } || haveawk=
rm -rf $TMP_DIR
while true; do while true; do
display_chains display_chains