You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2014/03/13 19:06:24 UTC

[37/50] [abbrv] git commit: updated refs/heads/rbac to 99bdc8d

CLOUDSTACK-5986: Fix dnsmasq lease for VPC


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8937434f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8937434f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8937434f

Branch: refs/heads/rbac
Commit: 8937434fce6958155e9871caa1648504b7c34999
Parents: 4679863
Author: Sheng Yang <sh...@citrix.com>
Authored: Tue Mar 11 16:13:30 2014 -0700
Committer: Sheng Yang <sh...@citrix.com>
Committed: Tue Mar 11 16:14:33 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/8937434f/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 c287d43..5751f09 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
 }