summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-01-05 00:44:39 +0100
committerKai Blin <kai@samba.org>2012-01-10 19:19:21 +0100
commitf489c681ea4dcdf13c62876cb0e21ca93882599b (patch)
tree5cb02513121fd7ccd5cc6e9d647aa656707599a6
parenta876d519fedc50ad4958ae772a2b836f00dcea48 (diff)
downloadsamba-f489c681ea4dcdf13c62876cb0e21ca93882599b.tar.gz
samba-f489c681ea4dcdf13c62876cb0e21ca93882599b.tar.bz2
samba-f489c681ea4dcdf13c62876cb0e21ca93882599b.zip
s4:provision: add the possibility to provision "server services" in smb.conf
Signed-off-by: Kai Blin <kai@samba.org>
-rw-r--r--source4/scripting/python/samba/provision/__init__.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index f55f9863ce..4f35f0d7f6 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -554,7 +554,8 @@ def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None,
def make_smbconf(smbconf, hostname, domain, realm, serverrole,
- targetdir, sid_generator="internal", eadb=False, lp=None):
+ targetdir, sid_generator="internal", eadb=False, lp=None,
+ server_services=None):
"""Create a new smb.conf file based on a couple of basic settings.
"""
assert smbconf is not None
@@ -603,6 +604,11 @@ def make_smbconf(smbconf, hostname, domain, realm, serverrole,
privdir = lp.get("private dir")
lp.set("posix:eadb", os.path.abspath(os.path.join(privdir, "eadb.tdb")))
+ if server_services is not None:
+ server_services_line = "server services = " + " ".join(server_services)
+ else:
+ server_services_line = ""
+
if targetdir is not None:
privatedir_line = "private dir = " + os.path.abspath(os.path.join(targetdir, "private"))
lockdir_line = "lock dir = " + os.path.abspath(targetdir)
@@ -632,7 +638,8 @@ def make_smbconf(smbconf, hostname, domain, realm, serverrole,
"PRIVATEDIR_LINE": privatedir_line,
"LOCKDIR_LINE": lockdir_line,
"STATEDIR_LINE": statedir_line,
- "CACHEDIR_LINE": cachedir_line
+ "CACHEDIR_LINE": cachedir_line,
+ "SERVER_SERVICES_LINE": server_services_line
})
# reload the smb.conf