summaryrefslogtreecommitdiffstats
path: root/source4/setup
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-31 02:39:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:35:04 -0500
commitf58a74aabab3d5c0d1185ac2f77a5f54feb781e9 (patch)
tree79d531450d96f07da379fdd72fb40d1221570627 /source4/setup
parent40f85ace04abad7460d0f0afe9211c4280482c6c (diff)
downloadsamba-f58a74aabab3d5c0d1185ac2f77a5f54feb781e9.tar.gz
samba-f58a74aabab3d5c0d1185ac2f77a5f54feb781e9.tar.xz
samba-f58a74aabab3d5c0d1185ac2f77a5f54feb781e9.zip
r9816: Work on testsuite for upgrade
Add 'paths' object to provision code. (This used to be commit 488d737fb0ebbc2535d0ec17c14f0dc1eaf2a578)
Diffstat (limited to 'source4/setup')
-rwxr-xr-xsource4/setup/provision2
-rwxr-xr-xsource4/setup/upgrade31
2 files changed, 21 insertions, 12 deletions
diff --git a/source4/setup/provision b/source4/setup/provision
index b3be197710..fd949ce9d9 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -110,6 +110,6 @@ var blank = (options["blank"] != undefined);
message("Provisioning for %s in realm %s\n", subobj.DOMAIN, subobj.REALM);
message("Using administrator password: %s\n", subobj.ADMINPASS);
-provision(subobj, message, blank);
+provision(subobj, message, blank, provision_default_paths(subobj));
message("All OK\n");
return 0;
diff --git a/source4/setup/upgrade b/source4/setup/upgrade
index 6f10096a45..331892c3db 100755
--- a/source4/setup/upgrade
+++ b/source4/setup/upgrade
@@ -10,7 +10,7 @@ options = GetOptions(ARGV,
"POPT_AUTOHELP",
"POPT_COMMON_SAMBA",
"POPT_COMMON_VERSION",
- 'ldif',
+ 'targetdir=s',
'quiet', 'blank');
if (options == undefined) {
@@ -32,13 +32,6 @@ function message()
}
}
-function ldifprint(data)
-{
- if (options.ldif != undefined) {
- print(data);
- }
-}
-
/*
show some help
*/
@@ -48,7 +41,7 @@ function ShowHelp()
Samba4 import tool
provision [options] <libdir> <smbconf>
- --ldif Dump LDIF
+ --targetdir=DIR Output to specified directory
--quiet Be quiet
--blank do not add users or groups, just the structure
@@ -73,11 +66,27 @@ if (samba3 == undefined) {
exit(1);
}
+
+
message("Provisioning\n");
var subobj = upgrade_provision(samba3);
-provision(subobj, message, options.blank);
+var paths;
+if (options.targetdir != undefined) {
+ paths = new Object();
+ paths.smbconf = sprintf("%s/smb.conf", options.targetdir);
+ var ldbs = new Array("hklm","hkcr","hku","hkcu","hkpd","hkpt","samdb","rootdse","secrets","winsdb");
+ for (var i in ldbs) {
+ var n = ldbs[i];
+ paths[n] = sprintf("tdb://%s/%s.ldb", options.targetdir, n);
+ }
+ paths.dns = options.targetdir+"/dns.zone";
+} else {
+ paths = provision_default_paths(subobj);;
+}
+
+provision(subobj, message, options.blank,paths);
-var ret = upgrade(subobj,samba3,message);
+var ret = upgrade(subobj,samba3,message,paths);
if (ret > 0) {
message("Failed to import %d entries\n", ret);
} else {