summaryrefslogtreecommitdiff
path: root/source4/setup
diff options
context:
space:
mode:
Diffstat (limited to 'source4/setup')
-rwxr-xr-xsource4/setup/provision.py2
-rwxr-xr-xsource4/setup/upgrade.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/source4/setup/provision.py b/source4/setup/provision.py
index f6f032da70..94560fc042 100755
--- a/source4/setup/provision.py
+++ b/source4/setup/provision.py
@@ -116,6 +116,8 @@ lp = param.LoadParm()
if opts.configfile:
lp.load(opts.configfile)
if opts.targetdir is not None:
+ if not os.path.exists(opts.targetdir):
+ os.mkdir(opts.targetdir)
lp.set("private dir", os.path.abspath(opts.targetdir))
lp.set("lock dir", os.path.abspath(opts.targetdir))
lp.set("realm", opts.realm)
diff --git a/source4/setup/upgrade.py b/source4/setup/upgrade.py
index c531e28ed5..ea6f83d7de 100755
--- a/source4/setup/upgrade.py
+++ b/source4/setup/upgrade.py
@@ -63,6 +63,8 @@ lp = param.LoadParm()
if opts.configfile:
lp.load(opts.configfile)
if opts.targetdir is not None:
+ if not os.path.exists(opts.targetdir):
+ os.mkdir(opts.targetdir)
lp.set("private dir", os.path.abspath(opts.targetdir))
lp.set("lock dir", os.path.abspath(opts.targetdir))
paths = provision_paths_from_lp(lp, "")