Command help?

Chris Tyler chris at tylers.info
Fri Sep 26 22:04:44 UTC 2008


On Fri, 2008-09-26 at 14:16 -0700, Rick Stevens wrote:
> >> AFAIK, telinit does NOT fire up the /etc/rc.d stuff by itself and that's
> >> how the K* and S* stuff get run.
> > As has been pointed out what you say is not true. Changes runlevel
> > should cause the correct rc* files to run. Check the man page of
> > telinit.
> 
> While the man page SAYS it "works closely together with the scripts in
> the directories /etc/init.d  and /etc/rc{run-level}.d," in my experience
> it really doesn't.
> 
> Under the classic scheme (F8 and older), /etc/init.d is a symlink to
> /etc/rc.d/init.d, which are the TARGETS of symlinks in /etc/rc.d/rc*.d.
> /etc/rc.d/init.d contains no K* or S* files at all, so I see no way for
> init to selectively run K* or S* files.  /etc/rc.d/rc is a script that
> DOES pick up run level changes and invokes the K* and S* scripts
> selectively.
> 
> With the new F9 mechanism perhaps it does work.  I'm not running F9
> yet except in a domU under Xen because, frankly, I don't trust it yet.
> 
> > There must bew something else that is wrong.
> 
> Perhaps, but I don't see how it can work "as advertised" with the file
> layout as it is.  It wouldn't be the first time a man page was
> incorrect.

Rick,

Since you won't listen to anyone else regarding /etc/rc.d/rc, please
take a couple minutes to prove to yourself that changing the runlevel
(telinit N or init N) actually does run that script:

(1) Add this line to /etc/rc.d/rc as the first line before the comments:

echo "$(date): $0 $*" >>/tmp/rc.log

(2) Switch runlevels with telinit or init.

(3) Check the file /tmp/rc.log

You'll see that /etc/rc.d/rc is in fact being run during the runlevel
switch:

 Fri Sep 26 17:53:35 EDT 2008: /etc/rc.d/rc 3
 Fri Sep 26 17:54:02 EDT 2008: /etc/rc.d/rc 5

--
Chris




More information about the fedora-list mailing list