From 1374ca57a7fc3dcf4dec1bb7f70d7a4fb249cdfc Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Thu, 30 Aug 2007 21:45:47 +0000 Subject: Resolves: #260341 Summary: Migration script references a non-existing directory (comment #22) Description: introduced ignoreOldEntries not to migrate obsolete config entries. --- ldap/admin/src/scripts/DSMigration.pm.in | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'ldap/admin/src/scripts') diff --git a/ldap/admin/src/scripts/DSMigration.pm.in b/ldap/admin/src/scripts/DSMigration.pm.in index ff701d44..d34e1657 100644 --- a/ldap/admin/src/scripts/DSMigration.pm.in +++ b/ldap/admin/src/scripts/DSMigration.pm.in @@ -104,6 +104,16 @@ my %ignoreOld = 'nsslapd-ldapiautodnsuffix' => 'nsslapd-ldapiautodnsuffix' ); +# these are the obsolete entries we do not migrate +my %ignoreOldEntries = +( + 'cn=presence,cn=plugins,cn=config' => 'cn=presence,cn=plugins,cn=config', + 'cn=aim presence,cn=presence,cn=plugins,cn=config' => 'cn=aim presence,cn=presence,cn=plugins,cn=config', + 'cn=icq presence,cn=presence,cn=plugins,cn=config' => 'cn=icq presence,cn=presence,cn=plugins,cn=config', + 'cn=yahoo presence,cn=presence,cn=plugins,cn=config' => 'cn=yahoo presence,cn=presence,cn=plugins,cn=config' +); + + # these are the attributes for which we will always use # the old value my %alwaysUseOld = @@ -519,10 +529,12 @@ sub mergeConfigEntries { debug(1, "Cannot migrate the entry $dn - skipping\n"); next; } elsif ($oldent && !$newent) { - # may have to fix up some values in the old entry - fixAttrsInEntry($oldent, $mig, $inst); - $rc = $dest->add($oldent); - $op = "add"; + if (!$ignoreOldEntries{$dn}) { # make sure it's not obsolete + # may have to fix up some values in the old entry + fixAttrsInEntry($oldent, $mig, $inst); + $rc = $dest->add($oldent); + $op = "add"; + } } elsif (!$oldent && $newent) { if ($dn =~ /o=deleteAfterMigration/i) { $rc = $dest->delete($dn); -- cgit