Well explained, Paul.  Now I understand. Thank you very much.

Also thanks a lot to Joseph and Brimer for their excellent help. 

________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Paul N 
[[email protected]]
Sent: Wednesday, June 15, 2011 12:19 PM
To: [email protected]
Subject: Re: /etc/rc*.d/K05st.exmple not executed when the system is shut down

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Zhou, Jingchen
> Sent: Wednesday, June 15, 2011 2:31 PM
> To: [email protected]
> Subject: RE: /etc/rc*.d/K05st.exmple not executed when the system is shut down
>
> Thanks again. Yes, I see /etc/init.d/killall. My question is that if the 
> daemon shutdown is all handled by killall, why do we install K* in /etc/rc*.d 
> and what is /etc/rc*.d/K* for?


I think /etc/rc.d/rc is still used for effecting the runlevel changes
(at least on my RHEL 5.5 box). Reading through that shows (on line 45)
how it first processes all the K scripts for the new runlevel, and
then processes the S scripts. So, shutting down would access
/etc/rc.d/r0.d/ for the K* files, then the S* files.

/etc/init.d/killall is really just there as a sanity check, I think.

Verify your shutdown script matches the checks performed in
/etc/rc.d/rc's KILL area, and you should be good to go for proper K
script execution.

Happy Lunar Eclipse day,

Paul

--
redhat-sysadmin-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list

--
redhat-sysadmin-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list

Reply via email to