From e34600413619e138ea525fbdd29e7d5ad149ef21 Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 4 Nov 2006 23:51:58 +0000 Subject: [PATCH] Check iptables execute permissions; don't recheck for the presense of 'awk' git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4794 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/compiler | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Shorewall/compiler b/Shorewall/compiler index cbf2e2ee6..b2d2a8d3b 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -4878,10 +4878,8 @@ __EOF__ # mycat() { - local awk=$(mywhich awk) - - if [ -n "$awk" ]; then - $awk 'BEGIN {blnk=0;}; /^\s*$/ {blnk=1; next; }; { while (/^\t* /) sub(/ /, "\t" ); if (blnk == 1 ) { print ""; blnk=0; }; print; }' $* + if [ -n "$HAVEAWK" ]; then + awk 'BEGIN {blnk=0;}; /^\s*$/ {blnk=1; next; }; { while (/^\t* /) sub(/ /, "\t" ); if (blnk == 1 ) { print ""; blnk=0; }; print; }' $* else cat $* fi @@ -5167,13 +5165,13 @@ __EOF__ cat >&3 << __EOF__ IPTABLES="$IPTABLES" - [ -e "$IPTABLES" ] || startup_error "IPTABLES=$IPTABLES does not exist or is not executable" + [ -x "$IPTABLES" ] || startup_error "IPTABLES=$IPTABLES does not exist or is not executable" __EOF__ else cat >&3 << __EOF__ [ -z "\$IPTABLES" ] && IPTABLES=\$(mywhich iptables 2> /dev/null) - [ -n "\$IPTABLES" -a -e "\$IPTABLES" ] || startup_error "Can't find iptables executable" + [ -n "\$IPTABLES" -a -x "\$IPTABLES" ] || startup_error "Can't find iptables executable" __EOF__ fi