mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
2f5f01567b
- get rid of redundeny dyn_CONFIGFILE argument to lp_load()
- fixed provisioning to work with completely pristine install,
creating an initial smb.conf is none is present
- added lp.set() and lp.reload() to loadparm ejs object interface
(This used to be commit c2691ef712
)
67 lines
1.4 KiB
Plaintext
67 lines
1.4 KiB
Plaintext
<% page_header("columns", "Provisioning", "/install/menu.js");
|
|
|
|
libinclude("base.js");
|
|
libinclude("provision.js");
|
|
%>
|
|
|
|
<h1>Samba4 provisioning</h1>
|
|
|
|
<%
|
|
var f = FormObj("Provisioning", 9, 2);
|
|
var i;
|
|
var lp = loadparm_init();
|
|
|
|
if (lp.get("realm") == "") {
|
|
lp.set("realm", lp.get("workgroup") + ".example.com");
|
|
}
|
|
|
|
|
|
var subobj = provision_guess();
|
|
|
|
f.element[0].label = "Realm";
|
|
f.element[0].name = "REALM";
|
|
f.element[1].label = "Domain Name";
|
|
f.element[1].name = "DOMAIN";
|
|
f.element[2].label = "Host Name";
|
|
f.element[2].name = "HOSTNAME";
|
|
f.element[3].label = "Administrator Password";
|
|
f.element[3].name = "ADMINPASS";
|
|
f.element[4].label = "Domain SID";
|
|
f.element[4].name = "DOMAINSID";
|
|
f.element[5].label = "Host GUID";
|
|
f.element[5].name = "HOSTGUID";
|
|
f.element[6].label = "Base DN";
|
|
f.element[6].name = "BASEDN";
|
|
f.element[7].label = "Host IP";
|
|
f.element[7].name = "HOSTIP";
|
|
f.element[8].label = "Default Site";
|
|
f.element[8].name = "DEFAULTSITE";
|
|
f.submit[0] = "Provision";
|
|
f.submit[1] = "Cancel";
|
|
|
|
if (form['submit'] == "Cancel") {
|
|
redirect("/");
|
|
}
|
|
|
|
if (form['submit'] == "Provision") {
|
|
for (r in form) {
|
|
subobj[r] = form[r];
|
|
}
|
|
}
|
|
|
|
for (i=0;i<f.element.length;i++) {
|
|
f.element[i].value = subobj[f.element[i].name];
|
|
}
|
|
|
|
lp.set("realm", subobj.REALM);
|
|
|
|
if (form['submit'] == "Provision") {
|
|
provision(subobj, writefln);
|
|
} else {
|
|
display_form(f);
|
|
}
|
|
%>
|
|
|
|
|
|
<% page_footer(); %>
|