[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Setup.pm.in, 1.8, 1.9 migrate-ds.pl.in, 1.2, 1.3 setup-ds.pl.in, 1.6, 1.7 template-migrate5to7, 1.5, NONE template-migrate6to7, 1.7, NONE template-migrateInstance7, 1.6, NONE template-migrateTo7, 1.6, NONE

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Wed Jul 18 20:37:13 UTC 2007


Author: rmeggins

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

Modified Files:
	Setup.pm.in migrate-ds.pl.in setup-ds.pl.in 
Removed Files:
	template-migrate5to7 template-migrate6to7 
	template-migrateInstance7 template-migrateTo7 
Log Message:
Resolves: bug 248145
Bug Description: Replace ds_newinst binary with perl script - remove dead code
Reviewed by: nhosoi (Thanks!)
Fix Description: This is my favorite part - removing all of the now dead code.  I also had to fix the exit code so that you could use $? to test for the success or failure of the new setup scripts.
Platforms tested: RHEL4, FC6
Flag Day: no
Doc impact: no



Index: Setup.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Setup.pm.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Setup.pm.in	29 Jun 2007 21:12:21 -0000	1.8
+++ Setup.pm.in	18 Jul 2007 20:37:11 -0000	1.9
@@ -215,8 +215,17 @@
 
 sub doExit {
     my $self = shift;
-    $self->msg($FATAL, 'setup_exiting', $self->{log}->{filename});
-	exit 1;
+    my $code = shift;
+    if (!defined($code)) {
+        $code = 1;
+    }
+
+    if ($code) {
+        $self->msg($FATAL, 'setup_exiting', $self->{log}->{filename});
+    } else {
+        $self->msg($SUCCESS, 'setup_exiting', $self->{log}->{filename});
+    }
+	exit $code;
 }
 
 # get a list of the directory servers in configdir
@@ -238,3 +247,10 @@
 # Mandatory TRUE return value.
 #
 1;
+
+# emacs settings
+# Local Variables:
+# mode:perl
+# indent-tabs-mode: nil
+# tab-width: 4
+# End:


Index: migrate-ds.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/migrate-ds.pl.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- migrate-ds.pl.in	13 Jul 2007 18:35:32 -0000	1.2
+++ migrate-ds.pl.in	18 Jul 2007 20:37:11 -0000	1.3
@@ -62,16 +62,15 @@
 
 $mig->msg('begin_ds_migration', $mig->{oldsroot});
 if (!migrateDS($mig)) {
-    exit 1;
+    $mig->doExit(1);
 }
 $mig->msg('end_ds_migration');
+$mig->doExit(0);
 
 END {
     if ($mig) {
         if (!$mig->{keep}) {
             unlink $mig->{inffile};
         }
-
-        $mig->doExit();
     }
 }


Index: setup-ds.pl.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/setup-ds.pl.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- setup-ds.pl.in	13 Jul 2007 18:35:32 -0000	1.6
+++ setup-ds.pl.in	18 Jul 2007 20:37:11 -0000	1.7
@@ -76,17 +76,18 @@
     $setup->msg(@errs);
     $setup->msg($FATAL, 'error_creating_dsinstance',
                 $setup->{inf}->{slapd}->{ServerIdentifier});
+    $setup->doExit(1);
 } else {
     $setup->msg('created_dsinstance',
                 $setup->{inf}->{slapd}->{ServerIdentifier});
 }
 
+$setup->doExit(0);
+
 END {
     if ($setup) {
         if (!$setup->{keep}) {
             unlink $setup->{inffile};
         }
-
-        $setup->doExit();
     }
 }


--- template-migrate5to7 DELETED ---


--- template-migrate6to7 DELETED ---


--- template-migrateInstance7 DELETED ---


--- template-migrateTo7 DELETED ---




More information about the Fedora-directory-commits mailing list