diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-08-29 12:31:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:55 -0500 |
commit | 0549763600b26fadac443555e1cbec5680f91340 (patch) | |
tree | 9cf7587abd038fd83e050cc1aa4ce317cd4a6b6e /swat/install/samba3.esp | |
parent | 054f206599e9d74de6429dc8f17d9c58342bcc98 (diff) | |
download | samba-0549763600b26fadac443555e1cbec5680f91340.tar.gz samba-0549763600b26fadac443555e1cbec5680f91340.tar.bz2 samba-0549763600b26fadac443555e1cbec5680f91340.zip |
r9735: More work on generating a valid Samba4 configuration using the
Samba3 data (both console and SWAT)
(This used to be commit d569465dc4def55c27878028f2fc762960f453d8)
Diffstat (limited to 'swat/install/samba3.esp')
-rw-r--r-- | swat/install/samba3.esp | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/swat/install/samba3.esp b/swat/install/samba3.esp index ead694a107..6fa246bb1c 100644 --- a/swat/install/samba3.esp +++ b/swat/install/samba3.esp @@ -9,30 +9,40 @@ <h1>Import from Samba3</h1> <% -var f = FormObj("Import from Samba3", 0, 2); -var i; - -f.add("SMBCONF", "smb.conf file"); -f.add("LIBDIR", "Lib directory"); -f.submit[0] = "Import"; -f.submit[1] = "Cancel"; - if (form['submit'] == "Cancel") { redirect("/"); } if (form['submit'] == "Import") { - for (r in form) { - subobj[r] = form[r]; - } -} + 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 f = FormObj("Import from Samba3", 0, 2); + f.submit[0] = "Continue"; + f.submit[1] = "Cancel"; + f.display(); +} else if (form['submit'] == "Continue") { + // FIXME +} else { + var f = FormObj("Import from Samba3", 0, 2); -f.element[0].value = "/etc/samba/smb.conf"; -f.element[1].value = "/var/lib/samba"; + f.add("SMBCONF", "smb.conf file"); + f.add("LIBDIR", "Lib directory"); + f.submit[0] = "Import"; + f.submit[1] = "Cancel"; + + f.element[0].value = "/etc/samba/smb.conf"; + f.element[1].value = "/var/lib/samba"; -if (form['submit'] == "import") { - // provision(subobj, writefln, false); -} else { f.display(); } %> |