Repository: cloudstack Updated Branches: refs/heads/4.3 f3668453f -> 6a6ec6480
CLOUDSTACK-5986: Fix dnsmasq lease for VPC (cherry picked from commit a253ff24682a7d405bfa8428a0833423bf19f9b9) Signed-off-by: Animesh Chaturvedi <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/92b9951d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/92b9951d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/92b9951d Branch: refs/heads/4.3 Commit: 92b9951df3050c8934b882b0b4c70828ac01f9af Parents: f366845 Author: Sheng Yang <[email protected]> Authored: Tue Mar 11 16:13:30 2014 -0700 Committer: Animesh Chaturvedi <[email protected]> Committed: Wed Mar 12 11:02:28 2014 -0700 ---------------------------------------------------------------------- .../patches/debian/config/etc/init.d/cloud-early-config | 10 ++++++++++ 1 file changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/92b9951d/systemvm/patches/debian/config/etc/init.d/cloud-early-config ---------------------------------------------------------------------- diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config index 77e0f17..9152df2 100755 --- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config +++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config @@ -1042,6 +1042,16 @@ EOF sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf #answer all local domain queries sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf + + command -v dhcp_release > /dev/null 2>&1 + no_dhcp_release=$? + if [ $no_dhcp_release -eq 0 ] + then + echo 1 > /var/cache/cloud/dnsmasq_managed_lease + sed -i -e "/^leasefile-ro/d" /etc/dnsmasq.conf + else + echo 0 > /var/cache/cloud/dnsmasq_managed_lease + fi }
