Skip to content

Commit 8326428

Browse files
jvanlieshoutDaanHoogland
authored andcommitted
A slightly more reliable way of extracting the device name. Thanks John.
Signed-off-by: Daan Hoogland <daan@onecht.net>
1 parent 1c88ea5 commit 8326428

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ if [ $dnsmasq_managed_lease ]
9999
then
100100
#release previous dhcp lease if present
101101
logger -t cloud "edithosts: releasing $ipv4"
102-
dhcp_release $(ip route get "$ipv4/32" | tr " " "\n" | grep eth) $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1
102+
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
103103
logger -t cloud "edithosts: released $ipv4"
104104
fi
105105

0 commit comments

Comments
 (0)