Re: Daemons startup order

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

 



Mike Klinke wrote:
On Saturday 06 August 2005 07:50, Sasa Stupar wrote:

Hi!

I am getting a warrning on sendmail start that it is missing
spamass.sock. OK, I have spamass-milter configured and it is
running fine but how do I make it start before sendmail on FC4?
Now spamassassin and spamass-milter are starting after sendmail.
So I need to start daemons in the following order:
spamassassin
spamass-milter
sendmail


Navigate to /etc/init.d and take a look at the files there. Most
files will have lines at the beginning that looks like this:

#! /bin/bash
#
# chkconfig: 2345 10 91
# description: start and stop ISDN services
#

In this case the chkconfig line says that this utility will have a
start priority of "10" and stop priority of "91".  See "man
chkconfig" for a explanation of this header.

For example, take a look a my isdn utility at all run levels:

# chkconfig --list | grep isdn
isdn     0:off   1:off   2:off   3:off   4:off   5:off   6:off

and looking at the indvidual entries in the /etc/rc.d/* directories
you can see the corresponding files:

# ls -Rw 1 /etc/rc.d/*/*isdn*
/etc/rc.d/init.d/isdn
/etc/rc.d/rc0.d/K91isdn
/etc/rc.d/rc1.d/K91isdn
/etc/rc.d/rc2.d/K91isdn
/etc/rc.d/rc3.d/K91isdn
/etc/rc.d/rc4.d/K91isdn
/etc/rc.d/rc5.d/K91isdn
/etc/rc.d/rc6.d/K91isdn

Now, start isdn on runleves 3, 4, and 5:

# chkconfig --levels 345 isdn on

# chkconfig --list | grep isdn
isdn    0:off   1:off   2:off   3:on    4:on    5:on    6:off

# ls -Rw 1 /etc/rc.d/*/*isdn
/etc/rc.d/init.d/isdn
/etc/rc.d/rc0.d/K91isdn
/etc/rc.d/rc1.d/K91isdn
/etc/rc.d/rc2.d/K91isdn
/etc/rc.d/rc3.d/S10isdn
/etc/rc.d/rc4.d/S10isdn
/etc/rc.d/rc5.d/S10isdn
/etc/rc.d/rc6.d/K91isdn

Now I want to start isdn at a differnt priority, say 9 instead of
 10 ( a tad sooner ):

Edit /etc/init.d/isdn to look like this:

#! /bin/bash
#
# chkconfig: 2345 9 91

and now use chkconfig to re-do the files:

# chkconfig --levels 345 isdn on

# ls -Rw 1 /etc/rc.d/*/*isdn
/etc/rc.d/init.d/isdn
/etc/rc.d/rc0.d/K91isdn
/etc/rc.d/rc1.d/K91isdn
/etc/rc.d/rc2.d/K91isdn
/etc/rc.d/rc3.d/S09isdn
/etc/rc.d/rc4.d/S09isdn
/etc/rc.d/rc5.d/S09isdn
/etc/rc.d/rc6.d/K91isdn


And now you can see that the files in rc3.d, rc4.d, and rc5.d have
 a priority value of 9 instead of 10 and are started just a tad
 sooner.

Take a look at the doc's here for more explanation:

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmi
n-guide/ch-services.html#S1-SERVICES-RUNLEVELS
 http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref-gu
ide/s1-boot-init-shutdown-sysv.html
 http://www.linuxvoodoo.com/resources/howtos/sysvinit/


Regards, Mike Klinke


Thanx Mike. This was very good explanation. Now I can configure my daemons boot order.

Regards,
Sasa


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux