mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-22 07:33:43 +01:00
Don't complain if the 'ip' executable doesn't exist.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
97846e14de
commit
740e19968b
@ -3422,9 +3422,6 @@ 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)
|
||||
|
||||
|
@ -658,7 +658,7 @@ loopback_interface() { #$1 = Interface name
|
||||
find_loopback_interfaces() {
|
||||
local interfaces
|
||||
|
||||
interfaces=$($IP link show | fgrep LOOPBACK | sed 's/://g' | cut -d ' ' -f 2)
|
||||
[ -x "$IP" ] && interfaces=$($IP link show | fgrep LOOPBACK | sed 's/://g' | cut -d ' ' -f 2)
|
||||
|
||||
[ -n "$interfaces" ] && echo $interfaces || echo lo
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user