Re: init order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri Jan 31 2003 at 22:18, Jesse Keating wrote:

> On Friday 31 January 2003 22:00, Ed.Greshko@greshko.com uttered:
> > I think you may have also wished to add that the scripts are numbered in
> > the /etc/init.d/rc#.d/ directories.  As in S01xxxx, S81xxxx and in that
> > case too the lower the number the earlier they start.
> >
> > Ed
> 
> Er yeah, thats what I meant.  The actual scripts are numbered, adn thats what
> you change, not the number part of rc#.d/
> 
> I guess it was a bit confusing what I wrote.

I'm sure that if you change the start/stop levels in the
"chkconfig:" line in any of the /etc/rc.d/init.d/ scripts and do
"chkconfig --add <servicename>", then the symlinks in the
/etc/rc.d/rc?.d/ directories will be modified appropriately for that
service.

(Perhaps you might need to first do "chkconfig --del" to remove the
old symlinks?  - yes, probably (sorry, it's been a while since I've
mucked around with chkconfig like this).

Ahh, the man page mentions a "reset" parameter to --level, I've
never used it but it seems that this might be used to cleanly do
what was originally wanted in one hit.


/sbin/chkconfig is a very useful too, it can really save a lot of
hassles doing runlevel configuration with init scripts, like getting
the symlinks names set up exactly as they should be.

It's also a very useful tool for quickly examining runlevel
configurations...

	chkconfig --list | grep 3:on	# services started at runlevel 3
	chkconfig --list | grep 3:off	# services NOT started at runlevel 3
	chkconfig --list | grep -v 3:o	# view xinetd services status

(I have similar commands as shell aliases/functions in my
/root/.bashrc file).

This shell one-liner will modify the init levels so that everything
started at runlevel 3 will also be started at runlevel 5...

# for s in $(chkconfig --list | grep 3:on | cut -d\  -f1) ; do chkconfig --level 5 $s on ; done

Oh, on second thought, this might be needed first to ensure that anything
not set to start at runlevel 3 is also not started at runlevel 5...

# for s in $(chkconfig --list | grep 3:off | cut -d\  -f1) ; do chkconfig --level 5 $s off ; done

(let your imagination go wild... :-)

Cheers
Tony



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux