summaryrefslogtreecommitdiff
path: root/swat/install
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-29 20:18:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:56 -0500
commitc9ace93ce22fed9e1b4e44a853e23bf66cf99184 (patch)
treeba89ee82e66f1b9ca217e05e7413e9bb9d496561 /swat/install
parentd4f22109ee5b939d34fe11ad4cef29d22fd82cc8 (diff)
downloadsamba-c9ace93ce22fed9e1b4e44a853e23bf66cf99184.tar.gz
samba-c9ace93ce22fed9e1b4e44a853e23bf66cf99184.tar.bz2
samba-c9ace93ce22fed9e1b4e44a853e23bf66cf99184.zip
r9756: One-way upgrade from Samba3->Samba4 basically works now
Still need to polish some rough edges (This used to be commit a8f309aa812533f57a90410722dfb342c8cf3b48)
Diffstat (limited to 'swat/install')
-rw-r--r--swat/install/samba3.esp25
1 files changed, 12 insertions, 13 deletions
diff --git a/swat/install/samba3.esp b/swat/install/samba3.esp
index 59c658a47c..729dcc74fd 100644
--- a/swat/install/samba3.esp
+++ b/swat/install/samba3.esp
@@ -9,7 +9,7 @@
include("/scripting/forms.js");
libinclude("base.js");
libinclude("provision.js");
- libinclude("samba3.js");
+ libinclude("upgrade.js");
%>
<h1>Import from Samba3</h1>
@@ -20,10 +20,9 @@ if (form['submit'] == "Cancel") {
}
if (form['submit'] == "Import") {
- var samba3 = samba3_read(form['SMBCONF'], form['LIBDIR']);
+ var samba3 = samba3_read(form['LIBDIR'], form['SMBCONF']);
var subobj = upgrade_provision(samba3);
-
var f = FormObj("Import from Samba3", 0, 2);
f.add("REALM", "Realm");
@@ -41,30 +40,30 @@ if (form['submit'] == "Import") {
f.element[i].value = subobj[f.element[i].name];
}
+ f.add("SMBCONF", "", "hidden", form['SMBCONF']);
+ f.add("LIBDIR", "", "hidden", form['LIBDIR']);
+
f.submit[0] = "Continue";
f.submit[1] = "Cancel";
f.display();
} else if (form['submit'] == "Continue") {
- var subobj = Object();
+ var samba3 = samba3_read(form['LIBDIR'], form['SMBCONF']);
+ assert(samba3 != undefined);
+ var subobj = upgrade_provision(samba3);
for (r in form) {
subobj[r] = form[r];
}
-
- provision(subobj, writefln, false);
-
- var samba3 = samba3_read(form['SMBCONF'], form['LIBDIR']);
+ provision(subobj, writefln, true);
upgrade(subobj, samba3, writefln);
} else {
var f = FormObj("Import from Samba3", 0, 2);
- f.add("SMBCONF", "smb.conf file");
- f.add("LIBDIR", "Lib directory");
+ f.add("SMBCONF", "smb.conf file", "text", "/etc/samba/smb.conf");
+ f.add("LIBDIR", "Lib directory", "text", "/var/lib/samba");
f.submit[0] = "Import";
f.submit[1] = "Cancel";
- f.element[0].value = "/etc/samba/smb.conf";
- f.element[1].value = "/var/lib/samba";
-
+ write('<p>Warning: This will erase your current configuration!</p>');
f.display();
}
%>