From da53a5502e3d8968a4ee233b80992e9e4b9e2889 Mon Sep 17 00:00:00 2001 From: wilderrodrigues Date: Wed, 21 Jan 2015 19:29:33 +0100 Subject: [PATCH] Fix restarting VPC --- .../debian/config/opt/cloud/bin/cs/CsGuestNetwork.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py index 43f209a5818..f9ecbfcb8b4 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py @@ -39,7 +39,12 @@ class CsGuestNetwork: if not self.guest: return self.config.get_dns() # Can a router provide dhcp but not dns? - return [ self.data['router_guest_gateway'] ] + self.data['dns'].split(',') + if 'dns' in self.data: + return [ self.data['router_guest_gateway'] ] + self.data['dns'].split(',') + elif "router_guest_gateway" in self.data: + return [ self.data['router_guest_gateway'] ] + else: + return [""] def set_dns(self, val): self.data['dns'] = val