diff options
author | mharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-03-10 19:19:57 +0000 |
---|---|---|
committer | mharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-03-10 19:19:57 +0000 |
commit | e3ffdb9a0a7557a210213e33af4b2c00f85d5d89 (patch) | |
tree | b142b8cce925ad8461df9b1850e4d0ecc0ae080f | |
parent | de398e39261d6cfd2e527151f7f2d850bc651882 (diff) | |
download | pki-e3ffdb9a0a7557a210213e33af4b2c00f85d5d89.tar.gz pki-e3ffdb9a0a7557a210213e33af4b2c00f85d5d89.tar.xz pki-e3ffdb9a0a7557a210213e33af4b2c00f85d5d89.zip |
Bugzilla Bug #440350 - Removed use of "rhgb-console" from "httpd" and
unnecessary creation/deletion of kill scripts.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@292 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
-rwxr-xr-x | pki/base/ca/shared/etc/init.d/httpd | 12 | ||||
-rwxr-xr-x | pki/base/kra/shared/etc/init.d/httpd | 12 | ||||
-rwxr-xr-x | pki/base/ocsp/shared/etc/init.d/httpd | 12 | ||||
-rwxr-xr-x | pki/base/ra/etc/init.d/httpd | 12 | ||||
-rwxr-xr-x | pki/base/setup/pkicommon | 69 | ||||
-rwxr-xr-x | pki/base/setup/pkicreate | 14 | ||||
-rwxr-xr-x | pki/base/setup/pkiremove | 21 | ||||
-rwxr-xr-x | pki/base/tks/shared/etc/init.d/httpd | 12 | ||||
-rwxr-xr-x | pki/base/tps/etc/init.d/httpd | 12 |
9 files changed, 26 insertions, 150 deletions
diff --git a/pki/base/ca/shared/etc/init.d/httpd b/pki/base/ca/shared/etc/init.d/httpd index e8b8de4c8..a91594c75 100755 --- a/pki/base/ca/shared/etc/init.d/httpd +++ b/pki/base/ca/shared/etc/init.d/httpd @@ -797,8 +797,7 @@ start() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" @@ -819,8 +818,7 @@ start() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" @@ -875,8 +873,7 @@ stop() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" @@ -886,8 +883,7 @@ stop() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" diff --git a/pki/base/kra/shared/etc/init.d/httpd b/pki/base/kra/shared/etc/init.d/httpd index 783948eff..899bd3112 100755 --- a/pki/base/kra/shared/etc/init.d/httpd +++ b/pki/base/kra/shared/etc/init.d/httpd @@ -797,8 +797,7 @@ start() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" @@ -819,8 +818,7 @@ start() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" @@ -875,8 +873,7 @@ stop() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" @@ -886,8 +883,7 @@ stop() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" diff --git a/pki/base/ocsp/shared/etc/init.d/httpd b/pki/base/ocsp/shared/etc/init.d/httpd index 5eb7d987a..67409b59d 100755 --- a/pki/base/ocsp/shared/etc/init.d/httpd +++ b/pki/base/ocsp/shared/etc/init.d/httpd @@ -797,8 +797,7 @@ start() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" @@ -819,8 +818,7 @@ start() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" @@ -875,8 +873,7 @@ stop() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" @@ -886,8 +883,7 @@ stop() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" diff --git a/pki/base/ra/etc/init.d/httpd b/pki/base/ra/etc/init.d/httpd index 560b34d0d..e0932b9c5 100755 --- a/pki/base/ra/etc/init.d/httpd +++ b/pki/base/ra/etc/init.d/httpd @@ -273,8 +273,7 @@ start() { done if [ -x /etc/init.d/functions ]; then - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" @@ -300,8 +299,7 @@ start() { done else if [ -x /etc/init.d/functions ]; then - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" @@ -347,16 +345,14 @@ stop() { rm -f ${pidfile} if [ -x /etc/init.d/functions ]; then - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" fi else if [ -x /etc/init.d/functions ]; then - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" diff --git a/pki/base/setup/pkicommon b/pki/base/setup/pkicommon index 423acaa11..9500a4bdc 100755 --- a/pki/base/setup/pkicommon +++ b/pki/base/setup/pkicommon @@ -2250,75 +2250,6 @@ if( $^O eq "linux" ) { } - # arg0 kill script link - # arg1 pki instance name - # arg2 user - # arg3 group - # no return - sub create_kill_script_symbolic_links_for_all_runlevels - { - my $kill_script_link = $_[0]; - my $pki_instance_name = $_[1]; - my $user = $_[2]; - my $group = $_[3]; - - my $i = 0; - my $kill_symlink_path = ""; - my $init_instance_path = "../init.d/$pki_instance_name"; - - emit( "Creating '$kill_script_link' symbolic links for " - . "'$pki_instance_name' at ALL runlevels:\n" ); - - for( $i = 0; $i <= $MAX_RUNLEVEL; $i++ ) { - $kill_symlink_path = "/etc/rc" . $i . ".d" . "/" - . $kill_script_link; - - $result = create_symbolic_link( $kill_symlink_path, - $init_instance_path ); - if( !$result ) { - emit( "Failed to create symlink $kill_symlink_path ...\n" ); - return; - } - - $result = give_symbolic_link_to( $kill_symlink_path, - $user, - $group ); - if( !$result ) { - emit( "$kill_symlink_path ownership problems!", - "error" ); - return; - } - - emit( " runlevel $i: '$kill_script_link' created\n" ); - } - - return; - } - - - # arg0 kill script link - # arg1 pki instance name - # no return - sub delete_kill_script_symbolic_links_for_all_runlevels - { - my $kill_script_link = $_[0]; - - my $i = 0; - my $kill_symlink_path = ""; - my $result = 0; - - for( $i = 0; $i <= $MAX_RUNLEVEL; $i++ ) { - $kill_symlink_path = "/etc/rc" . $i . ".d" . "/" - . $kill_script_link; - if( symbolic_link_exists( $kill_symlink_path ) ) { - system( "rm -rf $kill_symlink_path" ); - } - } - - return; - } - - # arg0 pki instance name # no return sub register_pki_instance_with_chkconfig diff --git a/pki/base/setup/pkicreate b/pki/base/setup/pkicreate index 9f7dd805b..3a42dd6f4 100755 --- a/pki/base/setup/pkicreate +++ b/pki/base/setup/pkicreate @@ -3763,14 +3763,11 @@ ASK_AGAIN: exit 255; } - # Create "kill scripts" (relative symbolic links) at ALL runlevels based - # upon the stop priority specified in this instance's start/stop script, - # and register this instance with "chkconfig" + # Register this instance with "chkconfig" if( $^O eq "linux" ) { my $runlevel = $DEFAULT_RUNLEVEL; my $start_priority = $DEFAULT_START_PRIORITY; my $stop_priority = $DEFAULT_STOP_PRIORITY; - my $kill_script_link = ""; # Extract "chkconfig" parameters from instance start/stop script ( $runlevel, $start_priority, $stop_priority ) = @@ -3783,15 +3780,6 @@ ASK_AGAIN: emit( "Setting '$pki_instance_name' stop priority " . "to '$stop_priority'\n" ); - # Create "kill script" symbolic links for ALL runlevels - $kill_script_link = "K" . "$stop_priority" . $pki_instance_name; - chdir( "$default_start_stop_scripts" ); - create_kill_script_symbolic_links_for_all_runlevels( $kill_script_link, - $pki_instance_name, - $root_user, - $root_group ); - chdir( "/tmp" ); - # Register this instance with '/sbin/chkconfig' register_pki_instance_with_chkconfig( $pki_instance_name ); } diff --git a/pki/base/setup/pkiremove b/pki/base/setup/pkiremove index 03119a787..9e719908b 100755 --- a/pki/base/setup/pkiremove +++ b/pki/base/setup/pkiremove @@ -561,33 +561,14 @@ ASK_AGAIN: return $result; } - # De-register this instance with "chkconfig", and remove the "kill scripts" - # (relative symbolic links) at ALL runlevels based upon the stop priority - # specified in this instance's start/stop script, + # De-register this instance with "chkconfig" if( $^O eq "linux" ) { - my $runlevel = ""; - my $start_priority = ""; - my $stop_priority = ""; - my $kill_script_link = ""; - # De-register this instance with '/sbin/chkconfig' print( STDOUT "\n" ); print( STDOUT "De-registering '$pki_instance_name' from " . "'/sbin/chkconfig'.\n" ); deregister_pki_instance_with_chkconfig( $pki_instance_name ); - - # Extract "chkconfig" parameters from instance start/stop script - ( $runlevel, $start_priority, $stop_priority ) = - extract_chkconfig_parameters_from_start_stop_script( - $pki_start_stop_script_instance_file_path ); - - # Delete "kill script" symbolic links for ALL runlevels - $kill_script_link = "K" . "$stop_priority" . $pki_instance_name; - print( STDOUT - "Deleting '$kill_script_link' from ALL runlevels.\n\n" ); - delete_kill_script_symbolic_links_for_all_runlevels( - $kill_script_link ); } if( $^O eq "linux" ) { diff --git a/pki/base/tks/shared/etc/init.d/httpd b/pki/base/tks/shared/etc/init.d/httpd index bdc7bf226..19679ac98 100755 --- a/pki/base/tks/shared/etc/init.d/httpd +++ b/pki/base/tks/shared/etc/init.d/httpd @@ -797,8 +797,7 @@ start() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" @@ -819,8 +818,7 @@ start() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" @@ -875,8 +873,7 @@ stop() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" @@ -886,8 +883,7 @@ stop() if [ "$CONSOLETYPE" = "serial" ]; then echo -n " " fi - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" diff --git a/pki/base/tps/etc/init.d/httpd b/pki/base/tps/etc/init.d/httpd index a79c698da..3d95cf367 100755 --- a/pki/base/tps/etc/init.d/httpd +++ b/pki/base/tps/etc/init.d/httpd @@ -272,8 +272,7 @@ start() { done if [ -x /etc/init.d/functions ]; then - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" @@ -299,8 +298,7 @@ start() { done else if [ -x /etc/init.d/functions ]; then - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" @@ -346,16 +344,14 @@ stop() { rm -f ${pidfile} if [ -x /etc/init.d/functions ]; then - echo_success > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_success echo else echo " [ OK ]" fi else if [ -x /etc/init.d/functions ]; then - echo_failure > /etc/rhgb/temp/rhgb-console - cat /etc/rhgb/temp/rhgb-console + echo_failure echo else echo " [ FAILED ]" |