Skip to content

Commit 8937434

Browse files
author
Sheng Yang
committed
CLOUDSTACK-5986: Fix dnsmasq lease for VPC
1 parent 4679863 commit 8937434

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

systemvm/patches/debian/config/etc/init.d/cloud-early-config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,16 @@ EOF
10421042
sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf
10431043
#answer all local domain queries
10441044
sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf
1045+
1046+
command -v dhcp_release > /dev/null 2>&1
1047+
no_dhcp_release=$?
1048+
if [ $no_dhcp_release -eq 0 ]
1049+
then
1050+
echo 1 > /var/cache/cloud/dnsmasq_managed_lease
1051+
sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf
1052+
else
1053+
echo 0 > /var/cache/cloud/dnsmasq_managed_lease
1054+
fi
10451055
}
10461056

10471057

0 commit comments

Comments
 (0)