[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Migration.pm.in, 1.3, 1.4 migrate-ds.res, 1.3, 1.4



Author: rmeggins

Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12992/ldapserver/ldap/admin/src/scripts

Modified Files:
	Migration.pm.in migrate-ds.res 
Log Message:
Resolves: bug 252190
Bug Description: 7.1 to 8.0 Migration Bug
Reviewed by: nhosoi (Thanks!)
Files: see diff
Branch: HEAD
Fix Description: Although the directory server always creates key/cert databases, the admin server does not.  So, just log a message and skip if they do not exist.  Also was missing some message resources for various errors.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no



Index: Migration.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Migration.pm.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Migration.pm.in	13 Jul 2007 18:35:32 -0000	1.3
+++ Migration.pm.in	15 Aug 2007 02:51:50 -0000	1.4
@@ -293,24 +293,39 @@
         $self->msg('new_secdir_error', $destdir, $!);
         return 0;
     } else {
-        $self->log($INFO, "Copying $oldroot/alias/$inst-cert8.db to $destdir/cert8.db\n");
-        if (system ("cp -p $oldroot/alias/$inst-cert8.db $destdir/cert8.db")) {
-            $self->msg($FATAL, 'error_copying_certdb', "$oldroot/alias/$inst-cert8.db",
-                       "$destdir/cert8.db", $!);
-            return 0;
+        if (-f "$oldroot/alias/$inst-cert8.db") {
+            $self->log($INFO, "Copying $oldroot/alias/$inst-cert8.db to $destdir/cert8.db\n");
+            if (system ("cp -p $oldroot/alias/$inst-cert8.db $destdir/cert8.db")) {
+                $self->msg($FATAL, 'error_copying_certdb', "$oldroot/alias/$inst-cert8.db",
+                           "$destdir/cert8.db", $!);
+                return 0;
+            }
+        } else {
+            $self->log($DEBUG, "No file to migrate: $oldroot/alias/$inst-cert8.db\n");
         }
-        $self->log($INFO, "Copying $oldroot/alias/$inst-key3.db to $destdir/key3.db\n");
-        if (system ("cp -p $oldroot/alias/$inst-key3.db $destdir/key3.db")) {
-            $self->msg($FATAL, 'error_copying_keydb', "$oldroot/alias/$inst-key3.db",
-                       "$destdir/key3.db", $!);
-            return 0;
+
+        if (-f "$oldroot/alias/$inst-key3.db") {
+            $self->log($INFO, "Copying $oldroot/alias/$inst-key3.db to $destdir/key3.db\n");
+            if (system ("cp -p $oldroot/alias/$inst-key3.db $destdir/key3.db")) {
+                $self->msg($FATAL, 'error_copying_keydb', "$oldroot/alias/$inst-key3.db",
+                           "$destdir/key3.db", $!);
+                return 0;
+            }
+        } else {
+            $self->log($DEBUG, "No file to migrate: $oldroot/alias/$inst-key3.db\n");
         }
-        $self->log($INFO, "Copying $oldroot/alias/secmod.db to $destdir/secmod.db\n");
-        if (system ("cp -p $oldroot/alias/secmod.db $destdir/secmod.db")) {
-            $self->msg($FATAL, 'error_copying_secmoddb', "$oldroot/alias/secmod.db",
-                       "$destdir/secmod.db", $!);
-            return 0;
+
+        if (-f "$oldroot/alias/secmod.db") {
+            $self->log($INFO, "Copying $oldroot/alias/secmod.db to $destdir/secmod.db\n");
+            if (system ("cp -p $oldroot/alias/secmod.db $destdir/secmod.db")) {
+                $self->msg($FATAL, 'error_copying_secmoddb', "$oldroot/alias/secmod.db",
+                           "$destdir/secmod.db", $!);
+                return 0;
+            }
+        } else {
+            $self->log($DEBUG, "No file to migrate: $oldroot/alias/secmod.db\n");
         }
+
         if (-f "$oldroot/alias/$inst-pin.txt") {
             $self->log($INFO, "Copying $oldroot/alias/$inst-pin.txt to $destdir/pin.txt\n");
             if (system ("cp -p $oldroot/alias/$inst-pin.txt $destdir/pin.txt")) {


Index: migrate-ds.res
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/migrate-ds.res,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- migrate-ds.res	13 Jul 2007 18:35:32 -0000	1.3
+++ migrate-ds.res	15 Aug 2007 02:51:50 -0000	1.4
@@ -12,3 +12,8 @@
 error_dbsrcdir_not_exist = Could not copy from the database source directory '%s' because it does not exist.  Please check your configuration.\n
 error_no_instances = Could not find any instances in the old directory '%s' to migrate.\n
 error_removing_temp_db_files = Could not remove the temporary db files in '%s' to clear the directory in preparation for the migrated db files.  Error: %s\n
+error_copying_certdb = Could not copy the certificate database file '%s' to '%s'.  Error: %s\n
+error_copying_keydb = Could not copy the private key database file '%s' to '%s'.  Error: %s\n
+error_copying_secmoddb = Could not copy the security module database file '%s' to '%s'.  Error: %s\n
+error_copying_pinfile = Could not copy the key database PIN file '%s' to '%s'.  Error: %s\n
+error_copying_certmap = Could not copy the client certificate mapping file '%s' to '%s'.  Error: %s\n


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]