[Fedora-directory-commits] adminserver/admserv/cgi-src40 ds_create.in, 1.5, 1.6

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Tue Nov 6 18:16:04 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/adminserver/admserv/cgi-src40
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6264/adminserver/admserv/cgi-src40

Modified Files:
	ds_create.in 
Log Message:
Resolves: bug 367941
Bug Description: On HPUX, Unable to create a 2nd instance of DS using console
Reviewed by: nhosoi, nkinder (Thanks!)
Fix Description: We weren't looking in the with-fhs-opt location for the start-slapd script.  But we shouldn't call this script directly anyway, we should use the DSCreate::startServer method.
Platforms tested: HP-UX
Flag Day: no
Doc impact: no
QA impact: This impacts instance creation with the console on all platforms, so we'll have to test those.
New Tests integrated into TET: none



Index: ds_create.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/ds_create.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ds_create.in	2 Aug 2007 14:44:10 -0000	1.5
+++ ds_create.in	6 Nov 2007 18:16:02 -0000	1.6
@@ -72,24 +72,10 @@
 
 my $servid = $query->param('servid');
 if (!defined($start_server) or $start_server) {
-    # ok to use here because not only will createDSInstance have validated that
-    # servid contains only good characters, but we test for the existence
-    # of this file first
-    my $prog = "@dslibdir@/slapd-$servid/start-slapd";
-    if (-x $prog) {
-        $? = 0;
-        # run the CGI
-        my $output = `$prog 2>&1`;
-        my $status = $?;
-        if ($status) {
-            print "Content-type: text/plain\n\n";
-            print "NMC_ErrInfo: Could not start directory server: $output\n";
-            print "NMC_Status: $status\n";
-            exit $status;
-        }
-    } else {
+    $inf->{slapd}->{start_server} = 1;
+    if (@errs = DSCreate::startServer($inf)) {
         print "Content-type: text/plain\n\n";
-        print "NMC_ErrInfo: The program $prog does not exist\n";
+        print "NMC_ErrInfo: ", $res->getText(@errs), "\n";
         print "NMC_Status: 1\n";
         exit 1;
     }




More information about the Fedora-directory-commits mailing list