From 2ebeec43340f33e2a00553b171452c6516ccc946 Mon Sep 17 00:00:00 2001 From: Joris van Lieshout Date: Wed, 14 May 2014 12:05:36 +0200 Subject: [PATCH] releasing dhcp leases on vpcs failes because the network tier of the tennant aren't behinbd eth0. Here we make interface selection dynamic. Signed-off-by: Daan Hoogland --- systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh b/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh index 70c95a88ad0..c1046c6dda4 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh +++ b/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh @@ -99,7 +99,7 @@ if [ $dnsmasq_managed_lease ] then #release previous dhcp lease if present logger -t cloud "edithosts: releasing $ipv4" - dhcp_release eth0 $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 + dhcp_release $(ip route get "$ipv4/32" | tr " " "\n" | grep eth) $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 logger -t cloud "edithosts: released $ipv4" fi