[node-patches] Change in ovirt-node[master]: setup: Allow only second DNS server
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Thu Sep 27 14:10:25 UTC 2012
Fabian Deutsch has uploaded a new change for review.
Change subject: setup: Allow only second DNS server
......................................................................
setup: Allow only second DNS server
Previously an exception was raised if only the second DNS server was
given and the first was left blank. This patch handles this case
correctly.
Change-Id: I56aa43684d19c99d53235ebba214bb084a2f7758
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-config-setup.py
1 file changed, 5 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/48/8248/1
diff --git a/scripts/ovirt-config-setup.py b/scripts/ovirt-config-setup.py
index f7798a0..d33e4c4 100755
--- a/scripts/ovirt-config-setup.py
+++ b/scripts/ovirt-config-setup.py
@@ -1481,17 +1481,18 @@
def process_network_config(self):
# First update the central "model" (defaults/ovirt)
- dns_servers = ""
+ dns_servers = []
ntp_servers = []
if not self.dns_host1.value() == "":
- dns_servers += self.dns_host1.value()
+ dns_servers.append(self.dns_host1.value())
if not self.dns_host2.value() == "":
- dns_servers += "," + self.dns_host2.value()
+ dns_servers.append(self.dns_host2.value())
if not self.ntp_host1.value() == "":
ntp_servers.append(self.ntp_host1.value())
if not self.ntp_host2.value() == "":
ntp_servers.append(self.ntp_host2.value())
- if not dns_servers == "":
+ if len(dns_servers) > 0:
+ dns_servers = ",".join(dns_servers)
augtool("set", "/files/" + OVIRT_DEFAULTS + "/OVIRT_DNS",
'"' + dns_servers + '"')
if len(ntp_servers) > 0:
--
To view, visit http://gerrit.ovirt.org/8248
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I56aa43684d19c99d53235ebba214bb084a2f7758
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list