svn commit: samba r19334 - in
branches/SAMBA_4_0/source/scripting/libjs: .
idra at samba.org
idra at samba.org
Mon Oct 16 12:05:44 GMT 2006
Author: idra
Date: 2006-10-16 12:05:44 +0000 (Mon, 16 Oct 2006)
New Revision: 19334
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19334
Log:
Commit commented provisioning code to activate the schema
Modified:
branches/SAMBA_4_0/source/scripting/libjs/provision.js
Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===================================================================
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js 2006-10-16 12:05:06 UTC (rev 19333)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js 2006-10-16 12:05:44 UTC (rev 19334)
@@ -282,6 +282,25 @@
return add_ok;
}
+function setup_modify_ldif(ldif, info, ldb, failok)
+{
+ var lp = loadparm_init();
+ var src = lp.get("setup directory") + "/" + ldif;
+
+ var data = sys.file_load(src);
+ data = substitute_var(data, info.subobj);
+
+ var mod_ok = ldb.modify(data);
+ if (!mod_ok) {
+ info.message("ldb load failed: " + ldb.errstring() + "\n");
+ if (!failok) {
+ assert(mod_ok);
+ }
+ }
+ return mod_ok;
+}
+
+
function setup_ldb(ldif, info, dbname)
{
var erase = true;
@@ -524,6 +543,19 @@
return true;
}
+// message("Activate schema module");
+// setup_modify_ldif("schema_activation.ldif", info, samdb, false);
+//
+// // (hack) Reload, now we have the schema loaded.
+// var commit_ok = samdb.transaction_commit();
+// if (!commit_ok) {
+// info.message("samdb commit failed: " + samdb.errstring() + "\n");
+// assert(commit_ok);
+// }
+// samdb.close();
+//
+// samdb = open_ldb(info, paths.samdb, false);
+//
message("Setting up sam.ldb users and groups\n");
setup_add_ldif("provision_users.ldif", info, samdb, false);
More information about the samba-cvs
mailing list