diff options
Diffstat (limited to 'source4/scripting/libjs')
-rw-r--r-- | source4/scripting/libjs/provision.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index 06b6f03779..d4551945d1 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -122,15 +122,18 @@ function setup_ldb(ldif, dbname, subobj) extra = arguments[3]; } - var db = lpGet("private dir") + "/" + dbname; + var dbfile = lpGet("private dir") + "/" + dbname; var src = lpGet("setup directory") + "/" + ldif; - sys.unlink(db); + sys.unlink(dbfile); var data = sys.file_load(src); data = data + extra; data = substitute_var(data, subobj); + var db = ldb.connect(dbfile); + assert(db != undefined); + ok = ldb.add(db, data); assert(ok); } |