summaryrefslogtreecommitdiff
path: root/swat/install
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-15 09:03:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:12 -0500
commitba07f94438560830f9b4470ecd9577b8333475bf (patch)
treeed313d0169b2b2cfcf21844c1cbfdc29b1f317e9 /swat/install
parentd59667fd2192920c8dd33cde8ff25fd5af0e00c3 (diff)
downloadsamba-ba07f94438560830f9b4470ecd9577b8333475bf.tar.gz
samba-ba07f94438560830f9b4470ecd9577b8333475bf.tar.bz2
samba-ba07f94438560830f9b4470ecd9577b8333475bf.zip
r12945: Try to move closer to getting Samba3 import working again.
There still a few things to work out Andrew Bartlett (This used to be commit 701558b5fe917555416eb0d100ef756f8ef7cf65)
Diffstat (limited to 'swat/install')
-rw-r--r--swat/install/samba3.esp27
1 files changed, 20 insertions, 7 deletions
diff --git a/swat/install/samba3.esp b/swat/install/samba3.esp
index 3c53bd621f..31857c01e9 100644
--- a/swat/install/samba3.esp
+++ b/swat/install/samba3.esp
@@ -69,13 +69,26 @@ if (form['submit'] == "Import") {
confirm_form();
} else {
var paths = provision_default_paths(subobj);
-
- provision(subobj, writefln, true, paths);
- upgrade(subobj, samba3, writefln, paths);
-
- writefln("Reloading smb.conf\n");
- var lp = loadparm_init();
- lp.reload();
+ if (!provision(subobj, writefln, true, paths,
+ session.authinfo.session_info, session.authinfo.credentials)) {
+ writefln("Provision failed!");
+ } else {
+ var ret = upgrade(subobj,samba3,message,paths,
+ session.authinfo.session_info, session.authinfo.credentials);
+ if (ret > 0) {
+ writefln("Failed to import %d entries\n", ret);
+ } else {
+ if (!provision_dns(subobj, writefln, paths,
+ session.authinfo.session_info, session.authinfo.credentials)) {
+ writefln("DNS Provision failed!");
+ } else {
+ writefln("Reloading smb.conf\n");
+ var lp = loadparm_init();
+ lp.reload();
+ writefln("Upgrade Complete!");
+ }
+ }
+ }
}
} else {
var f = FormObj("Import from Samba3", 0, 2);