From 07e1553f604fdf7a7547539fde77bdf5bf6b8dc9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 29 Dec 2004 22:59:28 +0000 Subject: r4400: Pass rootdse.ldif past the subst code. Andrew Bartlett (This used to be commit d901c8fb64440fd8f966cc3d8929bb63551019fd) --- source4/script/provision.pl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/script/provision.pl b/source4/script/provision.pl index 0940a3e30f..2dd37bed12 100755 --- a/source4/script/provision.pl +++ b/source4/script/provision.pl @@ -364,11 +364,28 @@ system("ldbadd -H newsam.ldb newsam.ldif"); print "done\n"; +$data = FileLoad("rootdse.ldif") || die "Unable to load rootdse.ldif\n"; + +$res = ""; + +print "applying substitutions ...\n"; + +while ($data =~ /(.*?)\$\{(\w*)\}(.*)/s) { + my $sub = substitute($2); + $res .= "$1$sub"; + $data = $3; +} +$res .= $data; + +print "saving ldif to newrootdse.ldif ...\n"; + +FileSave("newrootdse.ldif", $res); + unlink("newrootdse.ldb"); print "creating newrootdse.ldb ...\n"; -system("ldbadd -H newrootdse.ldb rootdse.ldif"); +system("ldbadd -H newrootdse.ldb newrootdse.ldif"); print "done\n"; @@ -408,6 +425,8 @@ Installation: Samba4 installation - Please move newrootdse.ldb to rootdse.ldb in the private/ directory of your Samba4 installation +- Please move newhklm.ldb to hklm.ldb in the private/ directory + of your Samba4 installation - Please use $dnsdomain.zone to in BIND dns server "; -- cgit