summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/provision.py
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-05-30 14:26:47 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-05-30 14:26:47 +1000
commitb9babfe4cc70b96f4f1df037244cd27eae580c94 (patch)
tree34516d2c45b37bccef4b38261324605f6a6c4305 /source4/scripting/python/samba/provision.py
parent437ca061077e77c3781db49243f0b3a290e8682d (diff)
downloadsamba-b9babfe4cc70b96f4f1df037244cd27eae580c94.tar.gz
samba-b9babfe4cc70b96f4f1df037244cd27eae580c94.tar.bz2
samba-b9babfe4cc70b96f4f1df037244cd27eae580c94.zip
Fix up provision and samdb tests.
This fixes up the provision to operate with a target directory - it must override the smb.conf in this case. Andrew Bartlett (This used to be commit 89fc39f7edb214065aff461bc225f41443eae3c7)
Diffstat (limited to 'source4/scripting/python/samba/provision.py')
-rw-r--r--source4/scripting/python/samba/provision.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 71c1ac3187..b7112e16c3 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -930,8 +930,9 @@ def provision(setup_dir, message, session_info,
if aci is None:
aci = "# no aci for local ldb"
- if smbconf is None:
- os.makedirs(os.path.join(targetdir, "etc"))
+ if targetdir is not None:
+ if (not os.path.exists(os.path.join(targetdir, "etc"))):
+ os.makedirs(os.path.join(targetdir, "etc"))
smbconf = os.path.join(targetdir, "etc", "smb.conf")
# only install a new smb.conf if there isn't one there already