diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-08-29 18:52:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:56 -0500 |
commit | 11f3f0fa6cfb0486bdc526465dc4c0e19467a30f (patch) | |
tree | 5afbcf0b284c5af9d158166c2b6b66c3e2700933 /swat | |
parent | 615e1c55bfd0b5e5cb2ac77b19a0c395ef566bd2 (diff) | |
download | samba-11f3f0fa6cfb0486bdc526465dc4c0e19467a30f.tar.gz samba-11f3f0fa6cfb0486bdc526465dc4c0e19467a30f.tar.bz2 samba-11f3f0fa6cfb0486bdc526465dc4c0e19467a30f.zip |
r9754: Upgrading with the command line utility now works, at least partially (-:
Upgrading using SWAT should work as well now.
(This used to be commit 8baa2ac377315ae8b365f58c2bda0bf3d0c5aec3)
Diffstat (limited to 'swat')
-rw-r--r-- | swat/install/samba3.esp | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/swat/install/samba3.esp b/swat/install/samba3.esp index 6fa246bb1c..59c658a47c 100644 --- a/swat/install/samba3.esp +++ b/swat/install/samba3.esp @@ -1,5 +1,11 @@ <% page_header("columns", "Upgrade", "install"); + /* frontend to Samba3 upgrade. + Based on provision.esp + (C) Jelmer Vernooij 2005 + Published under the GNU GPL + */ + include("/scripting/forms.js"); libinclude("base.js"); libinclude("provision.js"); @@ -14,24 +20,40 @@ if (form['submit'] == "Cancel") { } if (form['submit'] == "Import") { - write("LIBDIR: " + form['LIBDIR'] + "\n" + "SMBCONF: " + form['SMBCONF']); var samba3 = samba3_read(form['SMBCONF'], form['LIBDIR']); - domainname = samba3.get_param("global", "workgroup"); - var sec = samba3.find_domainsecrets(domainname); - write("<p>Import data from Samba3 installation.</p>\n"); - write("<table>\n"); - write("<tr><td>Domain name</td><td>" + domainname + "</td></tr>\n"); - write("<tr><td>Domain SID</td><td>" + sec.sid + "</td></tr>\n"); - write("<tr><td>Domain GUID</td><td>" + sec.guid + "</td></tr>\n"); - write("</table>"); + var subobj = upgrade_provision(samba3); var f = FormObj("Import from Samba3", 0, 2); + + f.add("REALM", "Realm"); + f.add("DOMAIN", "Domain Name"); + f.add("HOSTNAME", "Hostname"); + f.add("ADMINPASS", "Administrator Password", "password"); + f.add("CONFIRM", "Confirm Password", "password"); + f.add("DOMAINSID", "Domain SID"); + f.add("HOSTGUID", "Host GUID"); + f.add("BASEDN", "Base DN"); + f.add("HOSTIP", "Host IP"); + f.add("DEFAULTSITE", "Default Site"); + + for (i=0;i<f.element.length;i++) { + f.element[i].value = subobj[f.element[i].name]; + } + f.submit[0] = "Continue"; f.submit[1] = "Cancel"; f.display(); } else if (form['submit'] == "Continue") { - // FIXME + var subobj = Object(); + for (r in form) { + subobj[r] = form[r]; + } + + provision(subobj, writefln, false); + + var samba3 = samba3_read(form['SMBCONF'], form['LIBDIR']); + upgrade(subobj, samba3, writefln); } else { var f = FormObj("Import from Samba3", 0, 2); |