svn commit: samba r21743 - in
branches/SAMBA_4_0/source/script/tests: .
abartlet at samba.org
abartlet at samba.org
Wed Mar 7 11:05:59 GMT 2007
Author: abartlet
Date: 2007-03-07 11:05:59 +0000 (Wed, 07 Mar 2007)
New Revision: 21743
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21743
Log:
Always use the 'escaped' LDAPI path.
Wait around for the server to start, so we don't try to contact it
during it's starup phase.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/script/tests/Samba4.pm
branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh
Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/Samba4.pm
===================================================================
--- branches/SAMBA_4_0/source/script/tests/Samba4.pm 2007-03-07 10:29:39 UTC (rev 21742)
+++ branches/SAMBA_4_0/source/script/tests/Samba4.pm 2007-03-07 11:05:59 UTC (rev 21743)
@@ -13,9 +13,10 @@
use FindBin qw($RealBin);
use POSIX;
-sub slapd_start($$)
+sub slapd_start($$$)
{
- my ($conf, $uri, $loglevel) = @_;
+ my $count = 0;
+ my ($bindir, $conf, $uri) = @_;
# running slapd in the background means it stays in the same process group, so it can be
# killed by timelimit
if (defined($ENV{FEDORA_DS_PREFIX})) {
@@ -26,6 +27,14 @@
system("slapd -d$ENV{OPENLDAP_LOGLEVEL} -f $conf -h $uri > $ENV{LDAPDIR}/logs 2>&1 &");
$ENV{PATH} = $oldpath;
}
+ while (system("$bindir/ldbsearch -H $uri -s base -b \"\" supportedLDAPVersion > /dev/null") != 0) {
+ $count++;
+ if ($count > 10) {
+ slapd_stop();
+ return 0;
+ }
+ sleep(1);
+ }
return 1;
}
@@ -103,7 +112,6 @@
{
# give time for nbt server to register its names
print "delaying for nbt name registration\n";
- sleep(4);
# This will return quickly when things are up, but be slow if we
# need to wait for (eg) SSL init
@@ -113,6 +121,8 @@
system("bin/nmblookup $ENV{CONFIGURATION} -U $ENV{SERVER} $ENV{NETBIOSNAME}");
system("bin/nmblookup $ENV{CONFIGURATION} $ENV{NETBIOSNAME}");
system("bin/nmblookup $ENV{CONFIGURATION} -U $ENV{SERVER} $ENV{NETBIOSNAME}");
+ system("bin/nmblookup $ENV{CONFIGURATION} $ENV{NETBIOSNAME}");
+ system("bin/nmblookup $ENV{CONFIGURATION} -U $ENV{SERVER} $ENV{NETBIOSNAME}");
}
sub provision($)
Modified: branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh 2007-03-07 10:29:39 UTC (rev 21742)
+++ branches/SAMBA_4_0/source/script/tests/mk-fedora-ds.sh 2007-03-07 11:05:59 UTC (rev 21743)
@@ -65,8 +65,6 @@
$srcdir/bin/ad2oLschema $CONFIGURATION -H $PRIVATEDIR/sam.ldb --option=convert:target=fedora-ds -I $srcdir/setup/schema-map-fedora-ds-1.0 -O $FEDORA_DS_DIR/schema/99_ad.ldif >&2
-LDAP_URI_ESCAPE="ldapi://"`echo $LDAPDIR/ldapi | sed 's|/|%2F|g'`
-
PROVISION_OPTIONS="$PROVISION_OPTIONS --ldap-module=nsuniqueid"
#it is easier to base64 encode this than correctly escape it:
# (targetattr = "*") (version 3.0;acl "full access to all by all";allow (all)(userdn = "ldap:///anyone");)
More information about the samba-cvs
mailing list