mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 03:59:16 +01:00
Always set IP
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
4a4bfe77ce
commit
33e2e19193
@ -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)
|
||||
|
||||
}
|
||||
|
@ -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)
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user