mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 16:13:18 +01:00
Support version 3 of dhclient
This commit is contained in:
parent
e97f7a622c
commit
3162eff925
@ -824,6 +824,10 @@ detect_dynamic_gateway() { # $1 = interface
|
||||
gateway=$(grep 'option routers' /var/lib/dhcp/dhclient-${1}.lease | tail -n 1 | while read j1 j2 gateway; do echo $gateway; return 0; done)
|
||||
fi
|
||||
|
||||
if [ -z "$gateway" -a -f /var/lib/dhcp3/dhclient-${1}.leases ]; then
|
||||
gateway=$(grep 'option routers' /var/lib/dhcp3/dhclient-${1}.leases | tail -n 1 | while read j1 j2 gateway; do echo $gateway; return 0; done)
|
||||
fi
|
||||
|
||||
[ -n "$gateway" ] && echo $gateway
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user