diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-12-29 22:59:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:43 -0500 |
commit | 07e1553f604fdf7a7547539fde77bdf5bf6b8dc9 (patch) | |
tree | fddd51608221bdfdfe87298be10eafb17e8ade40 /source4 | |
parent | b386af06d066c8aeffa5b575492801e75db6f151 (diff) | |
download | samba-07e1553f604fdf7a7547539fde77bdf5bf6b8dc9.tar.gz samba-07e1553f604fdf7a7547539fde77bdf5bf6b8dc9.tar.bz2 samba-07e1553f604fdf7a7547539fde77bdf5bf6b8dc9.zip |
r4400: Pass rootdse.ldif past the subst code.
Andrew Bartlett
(This used to be commit d901c8fb64440fd8f966cc3d8929bb63551019fd)
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/script/provision.pl | 21 |
1 files changed, 20 insertions, 1 deletions
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 "; |