change the shutdown sequence in red hat linux

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat change the shutdown sequence in red hat linux
# 1  
Old 01-28-2010
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 ...
# 2  
Old 01-29-2010
Use chkconfig. The following article should help you: Managing Initscripts with Red Hat's chkconfig

HTH,
Loïc.
# 3  
Old 01-29-2010
Quote:
Originally Posted by Loic Domaigne
Use chkconfig. The following article should help you: Managing Initscripts with Red Hat's chkconfig

HTH,
Loïc.
Hi,
No, It is only work in starupt seq .
For shutdown seq , it is still hang and I need to manual to
shutdown the application and continue the shutdown process.....

Any advice ??????

---------- Post updated at 02:59 PM ---------- Previous update was at 02:30 PM ----------

Quote:
Originally Posted by Loic Domaigne
Use chkconfig. The following article should help you: Managing Initscripts with Red Hat's chkconfig

HTH,
Loïc.
I use chkconfig but I cannot create the K script , only S script present ....
Why ???gcota is my application name
there is no K script for gcota ....

Code:
[root@TSTgcota init.d]# chkconfig gcota reset
[root@TSTgcota init.d]# find /etc/rc.d -name "*gcota*" -print
/etc/rc.d/rc2.d/S96gcota
/etc/rc.d/rc3.d/S96gcota
/etc/rc.d/init.d/gcota
/etc/rc.d/rc1.d/S96gcota
/etc/rc.d/rc5.d/S96gcota
/etc/rc.d/rc6.d/S96gcota
/etc/rc.d/rc0.d/S96gcota
/etc/rc.d/rc4.d/S96gcota

[root@TSTgcota init.d]# ls -lt gcota
-rwxrwxrwx  1 root root 1269 Jan 29 14:58 gcota
[root@TSTgcota init.d]#

[root@TSTgcota init.d]# cat gcota
#! /bin/bash
#  chkconfig: 0123456 96 16
# description: start up GCOTA application
# processname: gcota


Last edited by pludi; 01-29-2010 at 03:06 AM.. Reason: code tags, please...
# 4  
Old 01-29-2010
First check that K16* is not already is use. If it is , use another number. Then change
Code:
#  chkconfig: 0123456 96 16

to
Code:
#chkconfig: 2345 96 16

and try again.
# 5  
Old 01-30-2010
Why the init level 3 ,4 ,5 not present a S script for gcota and
a K script for gcota ???
Only init level 0 ,1,2,6 present K script
init level 3 ,4, 5 present S script ??
Why do it not present both script in the same level ????


Code:
[root@TSTgcota init.d]# find /etc/rc.d -name "*gcota*" -print
/etc/rc.d/rc2.d/K04gcota
/etc/rc.d/rc3.d/S96gcota
/etc/rc.d/init.d/gcota
/etc/rc.d/rc1.d/K04gcota
/etc/rc.d/rc5.d/S96gcota
/etc/rc.d/rc6.d/K04gcota
/etc/rc.d/rc0.d/K04gcota
/etc/rc.d/rc4.d/S96gcota
[root@TSTgcota init.d]# head -20 /etc/initd./gcota
head: cannot open `/etc/initd./gcota' for reading: No such file or directory
[root@TSTgcota init.d]# head -20 /etc/init.d/gcota
#! /bin/bash
#  chkconfig: 345 96 4

# 6  
Old 01-30-2010
Quote:
Why the init level 3 ,4 ,5 not present a S script for gcota and
a K script for gcota ???
Only init level 0 ,1,2,6 present K script
init level 3 ,4, 5 present S script ??
Why do it not present both script in the same level ????
This is absolutely coherent with your chkconfig definition:
Code:
chkconfig: 345 96 4

You just told: activate my service at runlevel 3,4,5 (hence a S script at those levels), and shutdown service at the other level (hence a K scripts at levels 0,1,2,6).
When you reboot or halt, the runlevel 6 (or 0) shall be invoked, hence calling the K script.

HTH,
Loïc.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to download Red Hat Linux 7?

Pls help me where i can download linux 7 installations (7 Replies)
Discussion started by: ded325
7 Replies

2. Fedora

Which is the better platform to learn UNIX/Linux (Kali Linux Vs. Red Hat or other)?

I just started a new semester and I started my UNIX class yesterday. I've already decided to use python along with my learning process but what I really want to use with it is Kali as my UNIX/Linux platform to learn off of since I already wanted to learn Cyber Sec. anyways. I just wanted to know if... (12 Replies)
Discussion started by: ApacheOmega
12 Replies

3. UNIX for Dummies Questions & Answers

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ?

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ? (2 Replies)
Discussion started by: ahmedamer12
2 Replies

4. Red Hat

change IP and hostname in red hat ES 5

how I can change IP and hostname in red hat linux es 5 command mode , not in desktop GUI??? please advice in detailed (2 Replies)
Discussion started by: chuikingman
2 Replies

5. Red Hat

Red Hat Linux document

Hi Friends, I am working in new platform I need the document for Red hat Linux. Anybody have pls share with me. Regards, Thangadurai M (2 Replies)
Discussion started by: thangadurai
2 Replies

6. Red Hat

Red Hat Server Name Change

Hello Does anyone know if it s complicated process to change a Red Hat Server host name that also has a Oracle db installed on it? rgds D (2 Replies)
Discussion started by: deedaz
2 Replies

7. Linux

Red Hat Linux 9

Hello there! Will anybody please tell me some good links to online eBooks on Red Hat Linux 9 user experiences and the like. If the books are in PDF Format, it will be nice to read. Thanks for cooperation in advance. Enjoy using open source and breathe freely! JAM (5 Replies)
Discussion started by: Jawwad
5 Replies

8. UNIX for Dummies Questions & Answers

XP to Linux (Red Hat)

I have a PC running XP, and I have a PC that dual boots W2K and Red Hat Linux 7.3. I have the two connected via crossover cable, and the two can access each other when both are running windows. If I were to boot up Linux, can my XP PC telnet to the Linux PC? Any pointers or websites to... (3 Replies)
Discussion started by: lawadm1
3 Replies

9. UNIX for Dummies Questions & Answers

Slackware's Linux 3.0 VS Red Hat Linux 7.x

Hello guys, I got overzealous (I Think). I got the book Linux Unleashed that comes with the Slackware 3.0 Version of Linux for $2.00.I also have Red Hat Linux 7.2 (No book, just the OS).What I wanted to know was,other than the bells and whistles of Red Hat is there any significant difference... (2 Replies)
Discussion started by: perrylx
2 Replies

10. UNIX for Dummies Questions & Answers

Red Hat Linux 6.0

Ok here is my problem i do not know the command to load a driver for my network card in Ted hat linux 6.0 could sombody give me a hand. and if there is anyone that has a list of commands for red hat that would be great also (2 Replies)
Discussion started by: bbutler3295
2 Replies
Login or Register to Ask a Question