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
goodgod
Member
ranks
useravatar
User Info

Re: change the shutdown sequence in red hat linux

Hi i am a beginner for Linux.. How shutdown sequence play specific role in Linux programming?
remote desktop
remote desktop connection


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 269   Total Topics: 22   Total Polls: 0   Total Posts: 16777236   Dormant
User Info:   Newest User :  victorovermars   Members Online: 0   Guests Online: 36
Online  There are no members online
Generated in 0.141 sec. Queries: 68


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