summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-05-02 10:45:51 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-05-02 04:45:03 +0200
commit7b55ec290e2085cf928a467f2e7a9650e11cc0af (patch)
tree48dd78c1ecd8b7b39ce559b472cc6049f6d2aa4c
parentb6b4364a3d08b9c5d5b03338e24bf14afff9632b (diff)
downloadsamba-7b55ec290e2085cf928a467f2e7a9650e11cc0af.tar.gz
samba-7b55ec290e2085cf928a467f2e7a9650e11cc0af.tar.bz2
samba-7b55ec290e2085cf928a467f2e7a9650e11cc0af.zip
s4-provision: Fix up --use-s3fs to create the directory for xattr.tdb
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed May 2 04:45:05 CEST 2012 on sn-devel-104
-rw-r--r--source4/scripting/python/samba/provision/__init__.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index db202eff47..d84a0f87fc 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -119,6 +119,7 @@ class ProvisionPaths(object):
self.dns = None
self.winsdb = None
self.private_dir = None
+ self.state_dir = None
self.phpldapadminconfig = None
@@ -447,6 +448,7 @@ def provision_paths_from_lp(lp, dnsdomain):
"""
paths = ProvisionPaths()
paths.private_dir = lp.get("private dir")
+ paths.state_dir = lp.get("state directory")
# This is stored without path prefix for the "privateKeytab" attribute in
# "secrets_dns.ldif".
@@ -645,12 +647,12 @@ def make_smbconf(smbconf, hostname, domain, realm, targetdir,
if targetdir is not None:
global_settings["private dir"] = os.path.abspath(os.path.join(targetdir, "private"))
global_settings["lock dir"] = os.path.abspath(targetdir)
- global_settings["state directory"] = os.path.abspath(targetdir)
- global_settings["cache directory"] = os.path.abspath(targetdir)
+ global_settings["state directory"] = os.path.abspath(os.path.join(targetdir, "state"))
+ global_settings["cache directory"] = os.path.abspath(os.path.join(targetdir, "cache"))
lp.set("lock dir", os.path.abspath(targetdir))
- lp.set("state directory", os.path.abspath(targetdir))
- lp.set("cache directory", os.path.abspath(targetdir))
+ lp.set("state directory", global_settings["state directory"])
+ lp.set("cache directory", global_settings["cache directory"])
shares = {}
if serverrole == "domain controller":
@@ -1724,6 +1726,8 @@ def provision(logger, session_info, credentials, smbconf=None,
os.mkdir(paths.private_dir)
if not os.path.exists(os.path.join(paths.private_dir, "tls")):
os.mkdir(os.path.join(paths.private_dir, "tls"))
+ if not os.path.exists(paths.state_dir):
+ os.mkdir(paths.state_dir)
ldapi_url = "ldapi://%s" % urllib.quote(paths.s4_ldapi_path, safe="")