From d1c29231511376f4379909401f723b1ea9c538ea Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Mon, 8 Feb 2010 15:36:07 +0300 Subject: provision: Fix an error with eadb when using not default install dir and running as a non root user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Dieter Wallnöfer --- source4/scripting/python/samba/provision.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 86f1d9cb07..27e5287457 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -465,7 +465,11 @@ def make_smbconf(smbconf, setup_path, hostname, domain, realm, serverrole, if os.path.exists(smbconf): default_lp.load(smbconf) if eadb: - posixeadb_line = "posix:eadb = " + os.path.abspath(os.path.join(os.path.join(targetdir, "private"),"eadb.tdb")) + if targetdir is not None: + privdir = os.path.join(targetdir, "private") + else: + privdir = default_lp.get("private dir") + posixeadb_line = "posix:eadb = " + os.path.abspath(os.path.join(privdir,"eadb.tdb")) else: posixeadb_line = "" -- cgit