From 8ac5f6c0867ced24454fdb0648d5d376f054fb1c Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 11 Dec 2011 16:28:40 -0800 Subject: [PATCH] use specified tool for capabilities detection --- Shorewall/lib.cli | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Shorewall/lib.cli b/Shorewall/lib.cli index 196096dc5..4db0cb5fc 100644 --- a/Shorewall/lib.cli +++ b/Shorewall/lib.cli @@ -1818,13 +1818,15 @@ determine_capabilities() { local chain local chain1 - [ $g_family -eq 4 ] && tool=iptables || tool=ip6tables - - g_tool=$(mywhich $tool) - if [ -z "$g_tool" ]; then - echo " ERROR: No executable $tool binary can be found on your PATH" >&2 - exit 1 + [ $g_family -eq 4 ] && tool=iptables || tool=ip6tables + + g_tool=$(mywhich $tool) + + if [ -z "$g_tool" ]; then + echo " ERROR: No executable $tool binary can be found on your PATH" >&2 + exit 1 + fi fi qt $g_tool -t nat -L -n && NAT_ENABLED=Yes || NAT_ENABLED=