summaryrefslogtreecommitdiffstats
path: root/pki/base
diff options
context:
space:
mode:
authormharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-03-03 22:09:01 +0000
committermharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-03-03 22:09:01 +0000
commit3c3dab708f4a763cca056edebff862eb7d26e776 (patch)
tree9af262147111f4367090329f7141cb81dd700efa /pki/base
parent6a95833f494e6d7cbb6db4a151b0391b70eeef07 (diff)
downloadpki-3c3dab708f4a763cca056edebff862eb7d26e776.tar.gz
pki-3c3dab708f4a763cca056edebff862eb7d26e776.tar.xz
pki-3c3dab708f4a763cca056edebff862eb7d26e776.zip
Bugzilla Bug #440344 - Installation page should tell admins to use "service",
not "/etc/init.d" on Linux. git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@270 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base')
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java8
-rwxr-xr-xpki/base/ra/lib/perl/PKI/RA/DonePanel.pm10
-rwxr-xr-xpki/base/setup/pkicreate15
-rwxr-xr-xpki/base/tps/lib/perl/PKI/TPS/DonePanel.pm10
4 files changed, 37 insertions, 6 deletions
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
index 583548257..edd309b97 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
@@ -175,7 +175,13 @@ public class DonePanel extends WizardPanelBase {
select = cs.getString("preop.subsystem.select", "");
} catch (Exception e) {}
- context.put("instanceId", instanceId);
+ String os = System.getProperty( "os.name" );
+ if( os.equalsIgnoreCase( "Linux" ) ) {
+ context.put( "initCommand", "/sbin/service " + instanceId );
+ } else {
+ /* default case: e. g. - ( os.equalsIgnoreCase( "SunOS" ) */
+ context.put( "initCommand", "/etc/init.d/" + instanceId );
+ }
context.put("title", "Done");
context.put("panel", "admin/console/config/donepanel.vm");
context.put("host", ownhost);
diff --git a/pki/base/ra/lib/perl/PKI/RA/DonePanel.pm b/pki/base/ra/lib/perl/PKI/RA/DonePanel.pm
index 76827fcf3..064a0540e 100755
--- a/pki/base/ra/lib/perl/PKI/RA/DonePanel.pm
+++ b/pki/base/ra/lib/perl/PKI/RA/DonePanel.pm
@@ -329,10 +329,18 @@ sub display
my $unsecurePort = $::config->get("service.unsecurePort");
my $instanceID = $::config->get("service.instanceID");
+ my $initCommand = "";
+ if( $^O eq "linux" ) {
+ $initCommand = "/sbin/service $instanceID";
+ } else {
+ ## default case: e. g. - ( $^O eq "solaris" )
+ $initCommand = "/etc/init.d/$instanceID";
+ }
+
$::symbol{host} = $machineName;
$::symbol{port} = $securePort;
$::symbol{unsecurePort} = $unsecurePort;
- $::symbol{instanceId} = $instanceID;
+ $::symbol{initCommand} = $initCommand;
$::config->deleteSubstore("preop.");
$::config->commit();
diff --git a/pki/base/setup/pkicreate b/pki/base/setup/pkicreate
index f99fa5777..a2569e28c 100755
--- a/pki/base/setup/pkicreate
+++ b/pki/base/setup/pkicreate
@@ -517,6 +517,8 @@ my $pki_cfg_instance_file_path = ""; # CA, KRA, OCSP, TKS,
# RA, TPS
my $pki_cfg_subsystem_file_path = ""; # CA, KRA, OCSP, TKS,
# RA, TPS
+my $pki_start_stop_command = ""; # CA, KRA, OCSP, TKS,
+ # RA, TPS
my $pki_start_stop_script_instance_file_path = ""; # CA, KRA, OCSP, TKS,
# RA, TPS
my $pki_start_stop_script_subsystem_file_path = ""; # CA, KRA, OCSP, TKS,
@@ -3740,16 +3742,23 @@ ASK_AGAIN:
exit 255;
}
- $command = "$pki_start_stop_script_instance_file_path start";
+ if( $^O eq "linux" ) {
+ $pki_start_stop_command = "/sbin/service" . " " . $pki_instance_name;
+ } else {
+ # default case: e. g. - ( $^O eq "solaris" )
+ $pki_start_stop_command = $pki_start_stop_script_instance_file_path;
+ }
+
+ $command = "$pki_start_stop_command start";
system( "$command" );
print( STDOUT
"Server can be operated with "
- . "$pki_start_stop_script_instance_file_path "
+ . "$pki_start_stop_command "
. "start | stop | restart\n\n" );
emit( "Server can be operated with "
- . "$pki_start_stop_script_instance_file_path "
+ . "$pki_start_stop_command "
. "start | stop | restart\n",
"log" );
diff --git a/pki/base/tps/lib/perl/PKI/TPS/DonePanel.pm b/pki/base/tps/lib/perl/PKI/TPS/DonePanel.pm
index 1323e961d..796a713d7 100755
--- a/pki/base/tps/lib/perl/PKI/TPS/DonePanel.pm
+++ b/pki/base/tps/lib/perl/PKI/TPS/DonePanel.pm
@@ -341,10 +341,18 @@ sub display
my $unsecurePort = $::config->get("service.unsecurePort");
my $instanceID = $::config->get("service.instanceID");
+ my $initCommand = "";
+ if( $^O eq "linux" ) {
+ $initCommand = "/sbin/service $instanceID";
+ } else {
+ ## default case: e. g. - ( $^O eq "solaris" )
+ $initCommand = "/etc/init.d/$instanceID";
+ }
+
$::symbol{host} = $machineName;
$::symbol{port} = $securePort;
$::symbol{unsecurePort} = $unsecurePort;
- $::symbol{instanceId} = $instanceID;
+ $::symbol{initCommand} = $initCommand;
$::config->deleteSubstore("preop.");
$::config->commit();