Skip to content

            Lost ?  |  Need an account:
 
Home >> Forums >> Operating Systems >> Linux >> change the shutdown sequence in red hat linux
  • Index
  • Operating Systems
  • Users
  • Search

chuikingman
Member
ranks
useravatar
User Info

change the shutdown sequence in red hat linux

Hi,
I use red hat linux kernel 2.6
I want to add the application shutdown in shutdown sequence .
I add the K script in /etc/rc.d/ all sub directory for all
running level .
But the auto shutdown application is not appear when
I type "shutdown -r now" ..
There is no indication the application shutdown in the
display ...
The shutdown seq is hang/stop and I need to shutdown the application
by command manually .Then the shutdown process can be continue ....

Why ??/
how can I change the shutdown seq ???
Any advice ...


Administrator has disabled public posting
thirt
Member
ranks
useravatar
User Info

Re: change the shutdown sequence in red hat linux

Hi Chuikingman,

Although what you did sounds correct, its probably better to let chkconfig handle this sort of thing for you. 


  1. Clean up the rc.d directories removing any traces of your K and S scripts

  2. Copy your init script to /etc/init.d

  3. chkconfig --add <replace with the name of your script from the step above>



Thats it!  The script will be added to all the default runlevels.

If you want to make changes to which runlevels the script starts and stops with, use:
chkcong --level 35 <SCRIPT NAME> on  # This will turn the script on for runlevels 3 and 7
chkcong --level 2 <SCRIPT NAME> off   # This will turn the script off for runlevel 2

Best of luck!
-Tom


Administrator has disabled public posting
kenny22
Member
ranks
useravatar
User Info

Re: change the shutdown sequence in red hat linux

so using chkconfig is better than the scripts. wonder why they tried using the k and s script anyways.

Administrator has disabled public posting
tomfreak
Member
ranks
useravatar
User Info

Re: change the shutdown sequence in red hat linux

I am a new user to this can you tell me how to proceed for this............


furniture shipping


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 5126   Total Topics: 222   Total Polls: 1   Total Posts: 16777276   Total Posts Today: 13
User Info:   Newest User :  negosyo   Members Online: 0   Guests Online: 94
Online  There are no members online
Generated in 0.166 sec. Queries: 113


We thank you for visiting TcpDump and hope you find our knowledge base articles helpful. However, we need your support!!

If you found the content on our site useful, please help support us and visit one of our sponsors sites. Your support pays for the electric, servers and bandwidth required to run TcpDump and we can’t do it without your help!

Thank you again for all your support!

Best Regards,
-Tom Hirt