summaryrefslogtreecommitdiffstats
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
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
-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
-rw-r--r--pki/dogtag/common-ui/shared/admin/console/config/donepanel.vm6
-rw-r--r--pki/dogtag/ra-ui/shared/docroot/ra/admin/console/config/donepanel.vm2
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tps/admin/console/config/donepanel.vm8
7 files changed, 45 insertions, 14 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();
diff --git a/pki/dogtag/common-ui/shared/admin/console/config/donepanel.vm b/pki/dogtag/common-ui/shared/admin/console/config/donepanel.vm
index 573beda20..17f5aa803 100644
--- a/pki/dogtag/common-ui/shared/admin/console/config/donepanel.vm
+++ b/pki/dogtag/common-ui/shared/admin/console/config/donepanel.vm
@@ -33,12 +33,12 @@ function performPanel() {
<img alt="" src="../img/icon_crit_update.gif">&nbsp;<font color="red">$errorString</font>
#end
#if ($systemType.equals("tks"))
-Restart the server on the command line by typing "/etc/init.d/$instanceId restart". After performing this restart, the server should become operational.
+As 'root', restart the server on the command line by typing "$initCommand restart". After performing this restart, the server should become operational.
#else
#if ($externalCA.equals("true") && $systemType.equals("kra"))
-Restart the server on the command line by typing "/etc/init.d/$instanceId restart". Startup the administration console to add the peer CA to the Trusted Manager's Group. Make sure to add the transport certificate and connector information to the peer CA. After performing this restart, the server should become operational.
+As 'root', restart the server on the command line by typing "$initCommand restart". Startup the administration console to add the peer CA to the Trusted Manager's Group. Make sure to add the transport certificate and connector information to the peer CA. After performing this restart, the server should become operational.
#else
-Restart the server on the command line by typing "/etc/init.d/$instanceId restart". After performing this restart, the server should become operational.
+As 'root', restart the server on the command line by typing "$initCommand restart". After performing this restart, the server should become operational.
<br/>
Please go to the <A href="https://$host:$port/$systemType/services"><b>services page</b></A> to access all of the available interfaces.
<br/>
diff --git a/pki/dogtag/ra-ui/shared/docroot/ra/admin/console/config/donepanel.vm b/pki/dogtag/ra-ui/shared/docroot/ra/admin/console/config/donepanel.vm
index 4f28fa085..eda7d256f 100644
--- a/pki/dogtag/ra-ui/shared/docroot/ra/admin/console/config/donepanel.vm
+++ b/pki/dogtag/ra-ui/shared/docroot/ra/admin/console/config/donepanel.vm
@@ -32,7 +32,7 @@ function performPanel() {
#if ($errorString != "")
<img src="../img/icon_crit_update.gif">&nbsp;<font color="red">$errorString</font>
#end
-Restart the server on the command line by typing "/etc/init.d/$instanceId
+As 'root', restart the server on the command line by typing "$initCommand
restart". After performing this restart, the server should become operational.
<br/>
Please go to the <A href="https://$host:$port">service</A> page to access all of the available agent interfaces.
diff --git a/pki/dogtag/tps-ui/shared/docroot/tps/admin/console/config/donepanel.vm b/pki/dogtag/tps-ui/shared/docroot/tps/admin/console/config/donepanel.vm
index db18fd64f..40003bf9e 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tps/admin/console/config/donepanel.vm
+++ b/pki/dogtag/tps-ui/shared/docroot/tps/admin/console/config/donepanel.vm
@@ -1,7 +1,7 @@
<!-- --- BEGIN COPYRIGHT BLOCK ---
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
+ License as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -33,12 +33,12 @@ function performPanel() {
<img src="../img/icon_crit_update.gif">&nbsp;<font color="red">$errorString</font>
#end
#if ($systemType == "tks")
-Restart the server on the command line by typing "/etc/init.d/$instanceId restart". After performing this restart, the server should become operational.
+As 'root', restart the server on the command line by typing "$initCommand restart". After performing this restart, the server should become operational.
#else
#if ($externalCA == "true" && $systemType == "kra")
-Restart the server on the command line by typing "/etc/init.d/$instanceId restart". Startup the administration console to add the peer CA to the Trusted Manager's Group. Make sure to add the transport certificate and connector information to the peer CA. After performing this restart, the server should become operational.
+As 'root', restart the server on the command line by typing "$initCommand restart". Startup the administration console to add the peer CA to the Trusted Manager's Group. Make sure to add the transport certificate and connector information to the peer CA. After performing this restart, the server should become operational.
#else
-Restart the server on the command line by typing "/etc/init.d/$instanceId
+As 'root', restart the server on the command line by typing "$initCommand
restart". After performing this restart, the server should become operational.
<br/>
Please go to the <A href="https://$host:$port">agent interface</A> page to access all of the available agent interfaces.