summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs/provision.js
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/libjs/provision.js')
-rw-r--r--source4/scripting/libjs/provision.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index 6af753e7eb..948c02470d 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/scripting/libjs/provision.js
@@ -453,7 +453,7 @@ function provision_fix_subobj(subobj, message, paths)
return true;
}
-function provision_become_dc(subobj, message, paths, session_info)
+function provision_become_dc(subobj, message, erase, paths, session_info)
{
var lp = loadparm_init();
var sys = sys_init();
@@ -478,8 +478,10 @@ function provision_become_dc(subobj, message, paths, session_info)
message("Setting up " + paths.samdb + " rootDSE\n");
setup_add_ldif("provision_rootdse_add.ldif", info, samdb, false);
- message("Erasing data from partitions\n");
- ldb_erase_partitions(info, samdb, undefined);
+ if (erase) {
+ message("Erasing data from partitions\n");
+ ldb_erase_partitions(info, samdb, undefined);
+ }
message("Setting up " + paths.samdb + " indexes\n");
setup_add_ldif("provision_index.ldif", info, samdb, false);