Tweak INCLUDE fix

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5331 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-01-30 20:41:42 +00:00
parent 1d6b3cab47
commit 7857dc8719
2 changed files with 4 additions and 3 deletions

View File

@ -96,14 +96,15 @@ progress_message_and_save()
}
#
# Echo the contents of the passed file indented by $INDENT
# If a filename is passed, then echo the contents of that file indented by $INDENT and perform INCLUDE processing.
# If no filename is passed, then echo the contents of STDIN intended by $INDENT but do not perform INCLUDE processing.
#
indent() {
if [ -n "$INDENT" ]; then
if [ $# -ge 1 ]; then
read_file $1 0 | eval sed \'s\/^/"$INDENT"\/\' -
else
eval sed \'s\/^/"$INDENT"\/\' $1
eval sed \'s\/^/"$INDENT"\/\'
fi
elif [ $# -ge 1 ]; then
read_file $1 0

View File

@ -1586,7 +1586,7 @@ read_file() # $1 = file name, $2 = nest count
{
local first rest
if [ -f $1 ]; then
if [ -f $1 ]; then
while read first rest; do
if [ "x$first" = "xINCLUDE" ]; then
if [ $2 -lt 4 ]; then