ldap/admin/src/scripts/80upgradednformat.pl.in | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 77ca0bb587d38409916c2c130de17a61551b2499
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Apr 16 17:28:14 2013 -0700
Ticket #529 - dn normalization must handle multiple space characters in attributes
Bug Description: Commit 69ff83598d517bed84922b1c7dd67cab023b4d99
had a flaw -- When multiple server instances exist, upgrade dn
format fails due to missing server ID.
Fix Description: The upgrade script always passes server ID.
Reviewed by Rich (Thank you!!)
https://fedorahosted.org/389/ticket/529
(cherry picked from commit 72f3f04e1ec6d3d552f3d0141768329dcc632fe1)
diff --git a/ldap/admin/src/scripts/80upgradednformat.pl.in
b/ldap/admin/src/scripts/80upgradednformat.pl.in
index 6d14099..aa433e3 100644
--- a/ldap/admin/src/scripts/80upgradednformat.pl.in
+++ b/ldap/admin/src/scripts/80upgradednformat.pl.in
@@ -87,8 +87,8 @@ sub runinst {
my $ldifdir = $config_entry->{"nsslapd-ldifdir"}[0];
my $instancedir = $config_entry->{"nsslapd-instancedir"}[0];
my ($slapd, $serverID) = split(/-/, $instancedir);
- my $upgradednformat = "@sbindir@/upgradednformat";
- my $reindex = "@sbindir@/db2index";
+ my $upgradednformat = "@sbindir@/upgradednformat -Z $serverID";
+ my $reindex = "@sbindir@/db2index -Z $serverID";
# Scan through all of the backends to see if any of them
# contain escape characters in the DNs. If we find any
@@ -171,7 +171,7 @@ sub runinst {
# ancestorid index is in disorder; need to reindex it.
if ($disorder) {
print "The ancestorid index in $backend is in disorder;
Reindexing $ancestorid.\n";
- $cmd = "$reindex -Z $serverID -n $backend -t
ancestorid";
+ $cmd = "$reindex -n $backend -t ancestorid";
$rc = system("$cmd");
if ($rc & 127) {
push @errs, [ 'error_running_command', $cmd, $rc, $!
];
@@ -260,7 +260,7 @@ sub runinst {
if ((1 == $escapes) || (2 == $escapes) || (3 == $escapes)) {
# call conversion tool here and get return status.
- $cmd = "$upgradednformat -Z $serverID -n $backend -a
$workdir/$instname";
+ $cmd = "$upgradednformat -n $backend -a
$workdir/$instname";
$rc = system("$cmd");
if ($rc & 127) {
push @errs, [ 'error_running_command', $cmd, $rc, $! ];
@@ -274,7 +274,7 @@ sub runinst {
move("$dbinstdir.orig/dnupgrade/$instname",
"$dbinstdir");
copy("$dbinstdir.orig/dnupgrade/DBVERSION",
"$dbdir");
if ((1 == $escapes) || (3 == $escapes)) {
- $cmd = "$reindex -Z $serverID -n $backend -t
entryrdn";
+ $cmd = "$reindex -n $backend -t entryrdn";
$rc = system("$cmd");
if ($rc & 127) {
push @errs, [ 'error_running_command', $cmd, $rc, $!
];