use specified tool for capabilities detection

This commit is contained in:
Tom Eastep 2011-12-11 16:28:40 -08:00
parent cc78073ce7
commit 8ac5f6c086

View File

@ -1818,13 +1818,15 @@ determine_capabilities() {
local chain local chain
local chain1 local chain1
[ $g_family -eq 4 ] && tool=iptables || tool=ip6tables
g_tool=$(mywhich $tool)
if [ -z "$g_tool" ]; then if [ -z "$g_tool" ]; then
echo " ERROR: No executable $tool binary can be found on your PATH" >&2 [ $g_family -eq 4 ] && tool=iptables || tool=ip6tables
exit 1
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 fi
qt $g_tool -t nat -L -n && NAT_ENABLED=Yes || NAT_ENABLED= qt $g_tool -t nat -L -n && NAT_ENABLED=Yes || NAT_ENABLED=