Always set IP

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-01-02 09:28:50 -08:00
parent 4a4bfe77ce
commit 33e2e19193
2 changed files with 24 additions and 24 deletions

View File

@ -3400,11 +3400,6 @@ get_config() {
g_hostname=$(hostname 2> /dev/null)
IP=$(mywhich ip 2> /dev/null)
if [ -z "$IP" ] ; then
fatal_error "Can't find ip executable"
fi
if [ -n "$IPSET" ]; then
case "$IPSET" in
*/*)
@ -3426,6 +3421,11 @@ get_config() {
TC=tc
IP=$(mywhich ip 2> /dev/null)
if [ -z "$IP" ] ; then
fatal_error "Can't find ip executable"
fi
g_loopback=$(find_loopback_interfaces)
}

View File

@ -109,25 +109,6 @@ get_config() {
g_tool=$IP6TABLES
fi
if [ -n "$IP" ]; then
case "$IP" in
*/*)
if [ ! -x "$IP" ] ; then
fatal_error "The program specified in IP ($IP) does not exist or is not executable"
fi
;;
*)
prog="$(mywhich $IP 2> /dev/null)"
if [ -z "$prog" ] ; then
fatal_error "Can't find $IP executable"
fi
IP=$prog
;;
esac
else
IP='ip'
fi
if [ -n "$IPSET" ]; then
case "$IPSET" in
*/*)
@ -245,6 +226,25 @@ get_config() {
fi
fi
if [ -n "$IP" ]; then
case "$IP" in
*/*)
if [ ! -x "$IP" ] ; then
fatal_error "The program specified in IP ($IP) does not exist or is not executable"
fi
;;
*)
prog="$(mywhich $IP 2> /dev/null)"
if [ -z "$prog" ] ; then
fatal_error "Can't find $IP executable"
fi
IP=$prog
;;
esac
else
IP='ip'
fi
case $VERBOSITY in
-1|0|1|2)
;;