diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-12-21 02:33:43 -0600 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-24 01:50:59 -0600 |
commit | 571506e34ef9fbfe16de8ae2a6a39f932fb1b8a9 (patch) | |
tree | ea4e7de6543329ed433b3483f1be7e874f80f95d | |
parent | 758be0eedc8c0a780405a767970417f2c88dde27 (diff) | |
download | samba-571506e34ef9fbfe16de8ae2a6a39f932fb1b8a9.tar.gz samba-571506e34ef9fbfe16de8ae2a6a39f932fb1b8a9.tar.bz2 samba-571506e34ef9fbfe16de8ae2a6a39f932fb1b8a9.zip |
r26556: Make Fedora DS consistant use FEDORA_DS_ROOT, now we use OPENLDAP_ROOT.
Add in another varient to test with in the OpenLDAP module-guessing
game, from Howard Chu.
Andrew Bartlett
(This used to be commit 722d8a56651dfcd246c85904fed0e2aa48086dff)
-rw-r--r-- | source4/selftest/env/Samba4.pm | 25 | ||||
-rwxr-xr-x | source4/selftest/selftest.pl | 2 |
2 files changed, 19 insertions, 8 deletions
diff --git a/source4/selftest/env/Samba4.pm b/source4/selftest/env/Samba4.pm index f2ba37f618..4f8b96d332 100644 --- a/source4/selftest/env/Samba4.pm +++ b/source4/selftest/env/Samba4.pm @@ -46,7 +46,7 @@ sub slapd_start($$) # running slapd in the background means it stays in the same process group, so it can be # killed by timelimit if ($self->{ldap} eq "fedora-ds") { - system("$ENV{FEDORA_DS_PREFIX}/sbin/ns-slapd -D $env_vars->{FEDORA_DS_DIR} -d0 -i $env_vars->{FEDORA_DS_PIDFILE}> $env_vars->{LDAPDIR}/logs 2>&1 &"); + system("$ENV{FEDORA_DS_ROOT}/sbin/ns-slapd -D $env_vars->{FEDORA_DS_DIR} -d0 -i $env_vars->{FEDORA_DS_PIDFILE}> $env_vars->{LDAPDIR}/logs 2>&1 &"); } elsif ($self->{ldap} eq "openldap") { openldap_start($env_vars->{SLAPD_CONF}, $uri, "$env_vars->{LDAPDIR}/logs"); } @@ -204,10 +204,10 @@ sub mk_fedora_ds($$$) system("$self->{bindir}/ad2oLschema $configuration -H $ldapdir/schema-tmp.ldb --option=convert:target=fedora-ds -I $self->{setupdir}/schema-map-fedora-ds-1.0 -O $ldapdir/99_ad.ldif >&2") == 0 or die("schema conversion for Fedora DS failed"); my $dir = getcwd(); -chdir "$ENV{FEDORA_DS_PREFIX}/bin" || die; - if (system("perl $ENV{FEDORA_DS_PREFIX}/sbin/setup-ds.pl --silent --file=$fedora_ds_inf >&2") != 0) { +chdir "$ENV{FEDORA_DS_ROOT}/bin" || die; + if (system("perl $ENV{FEDORA_DS_ROOT}/sbin/setup-ds.pl --silent --file=$fedora_ds_inf >&2") != 0) { chdir $dir; - die("perl $ENV{FEDORA_DS_PREFIX}/sbin/setup-ds.pl --silent --file=$fedora_ds_inf FAILED: $?"); + die("perl $ENV{FEDORA_DS_ROOT}/sbin/setup-ds.pl --silent --file=$fedora_ds_inf FAILED: $?"); } chdir $dir || die; @@ -227,10 +227,10 @@ sub mk_openldap($$$) my $oldpath = $ENV{PATH}; my $olpath = ""; - my $olroot = ""; - if (defined $ENV{OPENLDAP_ROOT}) { + my $olroot = ""; + if (defined $ENV{OPENLDAP_ROOT}) { $olroot = "$ENV{OPENLDAP_ROOT}"; - $olpath = "$olroot/libexec:$olroot/sbin:"; + $olpath = "$olroot/libexec:$olroot/sbin:"; } $ENV{PATH} = "$olpath/usr/local/sbin:/usr/sbin:/sbin:$ENV{PATH}"; @@ -241,6 +241,17 @@ sub mk_openldap($$$) open(CONF, ">$modconf"); # enable slapd modules print CONF " +modulepath $olpath/libexec/openldap +moduleload back_hdb +moduleload syncprov +"; + close(CONF); + } + + if (system("slaptest -u -f $slapd_conf >&2") != 0) { + open(CONF, ">$modconf"); + # enable slapd modules + print CONF " moduleload back_hdb moduleload syncprov "; diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl index 8fccb8d4a0..7401205041 100755 --- a/source4/selftest/selftest.pl +++ b/source4/selftest/selftest.pl @@ -356,7 +356,7 @@ my $old_pwd = "$RealBin/.."; # Backwards compatibility: if (defined($ENV{TEST_LDAP}) and $ENV{TEST_LDAP} eq "yes") { - if (defined($ENV{FEDORA_DS_PREFIX})) { + if (defined($ENV{FEDORA_DS_ROOT})) { $ldap = "fedora-ds"; } else { $ldap = "openldap"; |