From e2a31da16343bc51fd5b376ad48a994b83d59b94 Mon Sep 17 00:00:00 2001 From: MJB <mjb@it-innovation.soton.ac.uk> Date: Fri, 1 Jun 2018 16:17:20 +0100 Subject: [PATCH] #44 fixed by with conts-destroy.sh, now removes static ip from /etc/lxc/dnsmasq.conf --- scripts/test/conts-destroy.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/test/conts-destroy.sh b/scripts/test/conts-destroy.sh index 29fa36d..456816d 100755 --- a/scripts/test/conts-destroy.sh +++ b/scripts/test/conts-destroy.sh @@ -12,7 +12,6 @@ for service_name in $service_names; do echo "Destroying container: ${service_name}" lxc-destroy -n ${service_name} ip=$(jq -r --arg NAME ${service_name} '.[] | select(.name==$NAME) | .ip_address' ${rspec_file}) - #TODO: this line doesn't work for some reason and it's also dangerous because an IP could match more than 1 line in the file - #sed -i '/${ip}/d' /etc/lxc/dnsmasq.conf + sed -i "/dhcp-host=${service_name},/d" /etc/lxc/dnsmasq.conf fi done -- GitLab