mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-15 02:41:01 +01:00
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
This commit is contained in:
parent
d8291a78e5
commit
e346004136
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user