From 6e51b833802fe65f9e9c35d6ac13e39b1396a8d8 Mon Sep 17 00:00:00 2001 From: teastep Date: Fri, 23 Apr 2004 02:53:27 +0000 Subject: [PATCH] A little code cleanup git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1285 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall2/firewall | 8 ++++---- Shorewall2/shorewall | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Shorewall2/firewall b/Shorewall2/firewall index 92097f27c..5b92f4390 100755 --- a/Shorewall2/firewall +++ b/Shorewall2/firewall @@ -1790,7 +1790,7 @@ setup_nat() { addnatrule nat_in -d $external -j DNAT --to-destination $internal addnatrule nat_out -s $internal -j SNAT --to-source $external - elif [ "x$allints" = "x" -o "x$allints" = "x-" -o "x$allints" = "xNo" -o "x$allints" = "xno" ]; then + elif [ -z "$allints" -o "x$allints" = "x-" -o "x$allints" = "xNo" -o "x$allints" = "xno" ]; then addnatrule $(input_chain $iface) \ -d $external -j DNAT --to-destination $internal addnatrule $(output_chain $iface) \ @@ -1801,7 +1801,7 @@ setup_nat() { if [ "x$localnat" = "xYes" -o "x$localnat" = "xyes" ]; then run_iptables2 -t nat -A OUTPUT -d $external -j DNAT --to-destination $internal - elif [ "x$localnat" != "x-" -a "x$localnat" != "x" -a "x$localnat" != "xNo" -a "x$localnat" != "xno" ]; then + elif [ "x$localnat" != "x-" -a -n "$localnat" -a "x$localnat" != "xNo" -a "x$localnat" != "xno" ]; then fatal_error "Invalid value ($allints) for LOCAL in entry \"$external $interface $internal $allints $localnat\"" fi @@ -5280,9 +5280,9 @@ define_firewall() # $1 = Command (Start or Restart) [ -n "$maclist_hosts" ] && setup_mac_lists echo "Pre-processing Actions..."; process_actions1 - echo "Processing $rules..."; process_rules + echo "Processing $(find_file rules)..."; process_rules echo "Processing Actions..."; process_actions2 - echo "Processing $policy..."; apply_policy_rules + echo "Processing $(find_file policy)..."; apply_policy_rules masq=$(find_file masq) [ -f $masq ] && setup_masq $masq diff --git a/Shorewall2/shorewall b/Shorewall2/shorewall index 604c1d2bd..03ca66b36 100755 --- a/Shorewall2/shorewall +++ b/Shorewall2/shorewall @@ -597,9 +597,9 @@ while [ $done -eq 0 ]; do -*) option=${option#-} - [ "x$option" = x ] && usage 1 + [ -z "$option" ] && usage 1 - while [ "x$option" != x ]; do + while [ -n "$option" ]; do case $option in c) [ $# -eq 1 ] && usage 1