[389-commits] ldap/admin

Richard Allen Megginson rmeggins at fedoraproject.org
Wed Jan 18 18:45:23 UTC 2012


 ldap/admin/src/scripts/repl-monitor.pl.in |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 165518b6ededc4e2ec977466078e2decce70d6cf
Author: Rich Megginson <rmeggins at redhat.com>
Date:   Thu Jan 12 15:34:54 2012 -0700

    Ticket #257 - repl-monitor doesn't work if leftmost hostnames are the same
    
    https://fedorahosted.org/389/ticket/257
    Resolves: Ticket #257
    Bug Description: repl-monitor doesn't work if leftmost hostnames are the same
    Reviewed by: nhosoi (Thanks!)
    Branch: master
    Fix Description: Match on the fqdn instead of just the hostname.  Verified
    that it works correctly in such an environment.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no

diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
index 89b777c..8839ed2 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -836,6 +836,11 @@ sub add_server
 	my ($domainpattern) = '\.[^:]+';
 	my ($i);
 
+	for ($i = 0; $i <= $#servers; $i++) {
+		return $i if ($servers[$i] =~ /$host:\d*=$shadowport\D/i);
+		return $i if ($servers[$i] =~ /$host:$port\D/i);
+	}
+
 	# Remove the domain name from the host name
 	my ($hostnode) = $host;
 	$hostnode = $1 if $host =~ /^(.+?)\./;
@@ -872,11 +877,6 @@ sub add_server
 		$bindcert = $c if ($bindcert eq "" || $bindcert eq "*");
 	}
 
-	for ($i = 0; $i <= $#servers; $i++) {
-		return $i if ($servers[$i] =~ /$hostnode($domainpattern)*:\d*=$shadowport\D/i);
-		return $i if ($servers[$i] =~ /$hostnode($domainpattern)*:$port\D/i);
-	}
-
 	if ($shadowport) {
 		push (@servers, "$host:$port=$shadowport:$binddn:$bindpwd:$bindcert");
 	} else {




More information about the 389-commits mailing list