cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [32/50] git commit: updated refs/heads/master to 3c429ee
Date Tue, 17 Mar 2015 10:26:34 GMT
{ip: hosts} syntax goes wrong if ip contains 1::
Needs to anchore regexp


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

Branch: refs/heads/master
Commit: 639126da8b2d49e03482799a34541bdea3534dfc
Parents: aa6fdf8
Author: Ian Southam <isoutham@schubergphilis.com>
Authored: Mon Feb 9 15:40:36 2015 +0100
Committer: wilderrodrigues <wrodrigues@schubergphilis.com>
Committed: Mon Mar 16 11:40:05 2015 +0100

----------------------------------------------------------------------
 systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/639126da/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py
index 7278785..0a1c8e2 100644
--- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py
+++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py
@@ -130,7 +130,7 @@ class CsDhcp(CsDataBag):
     def write_hosts(self):
         file = CsFile("/etc/hosts")
         for ip in self.hosts:
-            file.search("%s" % ip, "%s\t%s" % (ip, self.hosts[ip]))
+            file.search("^%s" % ip, "%s\t%s" % (ip, self.hosts[ip]))
         file.commit()
         if file.is_changed():
             logging.info("Updated hosts file")
@@ -155,4 +155,4 @@ class CsDhcp(CsDataBag):
                 v['gateway'] = entry['default_gateway']
 
     def add_host(self, ip, hosts):
-        self.hosts.update({ip: hosts})
+        self.hosts[ip] = hosts


Mime
View raw message