diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-06-05 09:56:53 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-06-05 04:27:36 +0200 |
commit | d2b635cc2f031364be1f25a7f8fb897a78764e5c (patch) | |
tree | cb986b044b8586ad03d09dbab5b0171288e7c530 /source4/scripting | |
parent | 68769c26ff1bf7d6b36820c64e71169b35434061 (diff) | |
download | samba-d2b635cc2f031364be1f25a7f8fb897a78764e5c.tar.gz samba-d2b635cc2f031364be1f25a7f8fb897a78764e5c.tar.xz samba-d2b635cc2f031364be1f25a7f8fb897a78764e5c.zip |
s4-provision: Place xattr.tdb in the actual state directory
This patch does two things: it fixes up the spelling of "state dir" to
"state directory" so that we actually find the smb.conf parameter, and
we move it to after we process the global settings in case this is
changed in the future.
Andrew Bartlett
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/provision/__init__.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py index 1dc69a1f1b1..a84bb5b7eae 100644 --- a/source4/scripting/python/samba/provision/__init__.py +++ b/source4/scripting/python/samba/provision/__init__.py @@ -627,19 +627,6 @@ def make_smbconf(smbconf, hostname, domain, realm, targetdir, #Load non-existant file if os.path.exists(smbconf): lp.load(smbconf) - if eadb: - if use_ntvfs and not lp.get("posix:eadb"): - if targetdir is not None: - privdir = os.path.join(targetdir, "private") - else: - privdir = lp.get("private dir") - lp.set("posix:eadb", os.path.abspath(os.path.join(privdir, "eadb.tdb"))) - elif not use_ntvfs and not lp.get("xattr_tdb:file"): - if targetdir is not None: - statedir = os.path.join(targetdir, "state") - else: - statedir = lp.get("state dir") - lp.set("xattr_tdb:file", os.path.abspath(os.path.join(statedir, "xattr.tdb"))) if global_param is not None: for ent in global_param: @@ -656,6 +643,20 @@ def make_smbconf(smbconf, hostname, domain, realm, targetdir, lp.set("state directory", global_settings["state directory"]) lp.set("cache directory", global_settings["cache directory"]) + if eadb: + if use_ntvfs and not lp.get("posix:eadb"): + if targetdir is not None: + privdir = os.path.join(targetdir, "private") + else: + privdir = lp.get("private dir") + lp.set("posix:eadb", os.path.abspath(os.path.join(privdir, "eadb.tdb"))) + elif not use_ntvfs and not lp.get("xattr_tdb:file"): + if targetdir is not None: + statedir = os.path.join(targetdir, "state") + else: + statedir = lp.get("state directory") + lp.set("xattr_tdb:file", os.path.abspath(os.path.join(statedir, "xattr.tdb"))) + shares = {} if serverrole == "domain controller": shares["sysvol"] = os.path.join(lp.get("state directory"), "sysvol") |