provision: Fix an error with eadb when using not default install dir and running...
authorMatthieu Patou <mat@matws.net>
Mon, 8 Feb 2010 12:36:07 +0000 (15:36 +0300)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 11 Feb 2010 10:47:04 +0000 (11:47 +0100)
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
source4/scripting/python/samba/provision.py

index 86f1d9cb0704051586bfce43e44173df4496f4e2..27e5287457b7cafdbdaf93484cbcb1569becc722 100644 (file)
@@ -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 = ""