A slightly more reliable way of extracting the device name. Thanks John.

Signed-off-by: Daan Hoogland <daan@onecht.net>
This commit is contained in:
Joris van Lieshout 2014-05-20 11:02:14 +02:00 committed by Daan Hoogland
parent 61c765b230
commit 2b325afb45
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ if [ $dnsmasq_managed_lease ]
then
#release previous dhcp lease if present
logger -t cloud "edithosts: releasing $ipv4"
dhcp_release $(ip route get "$ipv4/32" | tr " " "\n" | grep eth) $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1
dhcp_release $(ip route get "$ipv4/32" | grep " dev " | sed -e "s/^.* dev \([^ ]*\) .*$/\1/g") $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1
logger -t cloud "edithosts: released $ipv4"
fi