Only process /etc/shorewall/rtrules if it is non-empty

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3766 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-04-02 16:18:36 +00:00
parent 4bd4a393ea
commit 0bdffef40b

View File

@ -1387,15 +1387,19 @@ __EOF__
f=$(find_file rtrules)
if [ -f $f ]; then
progress_message2 "$DOING $f..."
strip_file rtrules $f
while read provider priority source dest; do
expandv priority provider source dest
rule="$priority $provider $source $dest"
add_an_rtrule
done < $TMP_DIR/rtrules
if [ -s $TMP_DIR/rtrules ]; then
progress_message2 "$DOING $f..."
save_command
while read provider priority source dest; do
expandv priority provider source dest
rule="$priority $provider $source $dest"
add_an_rtrule
done < $TMP_DIR/rtrules
fi
fi
fi