From ba07f94438560830f9b4470ecd9577b8333475bf Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 15 Jan 2006 09:03:28 +0000 Subject: 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) --- swat/install/samba3.esp | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'swat/install') 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); -- cgit