DNS fowarder patch.
Ricky Nance
ricky.nance at weaubleau.k12.mo.us
Wed Sep 26 17:21:55 MDT 2012
samba-tool domain provision would throw an exception if there was no dns
forwarder given. This defaults it to "none", so we might want to update
provision and tell the user more about what a dns forwarder does. Thoughts?
Ricky
--
-------------- next part --------------
From b68fbd84f1bd641f02105d03de3c1e15dd4f065e Mon Sep 17 00:00:00 2001
From: Ricky Nance <ricky.nance at weaubleau.k12.mo.us>
Date: Wed, 26 Sep 2012 18:14:30 -0500
Subject: [PATCH] samba-tool domain provision: DNS forwarder default
Provision would break with an exception if there was no value given for the DNS forwarder, this simply sets a default to "none".
---
source4/scripting/python/samba/netcmd/domain.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py
index 43e9259..ec2c6d5 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -265,10 +265,13 @@ class cmd_domain_provision(Command):
creds.set_kerberos_state(DONT_USE_KERBEROS)
- if dns_forwarder is not None:
+ if dns_forwarder is not None:
suggested_forwarder = dns_forwarder
else:
- suggested_forwarder = self._get_nameserver_ip()
+ if self._get_nameserver_ip() is not None:
+ suggested_forwarder = self._get_nameserver_ip()
+ else:
+ suggested_forwarder = "none"
if len(self.raw_argv) == 1:
interactive = True
--
1.7.9.5
More information about the samba-technical
mailing list