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 3f102e6e28d0..74896502ae17 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py @@ -44,7 +44,7 @@ def process(self): continue self.add(self.dbag[item]) self.write_hosts() - + if self.cloud.is_changed(): self.delete_leases() @@ -103,12 +103,10 @@ def delete_leases(self): return def preseed(self): - self.add_host("127.0.0.1", "localhost") + self.add_host("127.0.0.1", "localhost %s" % CsHelper.get_hostname()) self.add_host("::1", "localhost ip6-localhost ip6-loopback") self.add_host("ff02::1", "ip6-allnodes") self.add_host("ff02::2", "ip6-allrouters") - if self.config.is_vpc(): - self.add_host("127.0.0.1", CsHelper.get_hostname()) if self.config.is_router(): self.add_host(self.config.address().get_guest_ip(), "%s data-server" % CsHelper.get_hostname())