Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I setup bind-dlz and need mysql start prior NAMED when system starts here is what I have

[root@semenov]# ./test.sh   
mysql           0:off   1:off   2:on    3:on    4:on    5:on    6:off
named           0:off   1:off   2:off   3:on    4:on    5:on    6:off
lrwxrwxrwx. 1 root root 15 Apr 15 18:57 /etc/rc3.d/S93mysql -> ../init.d/mysql
lrwxrwxrwx. 1 root root 15 Apr 15 18:57 /etc/rc3.d/S90named -> ../init.d/named

here is what I have in mysql init script

# Comments to support chkconfig on RedHat Linux
# chkconfig: 2345 84 16
# description: A very fast and reliable SQL database engine.

# Comments to support LSB init script conventions
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $local_fs $network $remote_fs
# Should-Start: ypbind nscd ldap ntpd xntpd
# Required-Stop: $local_fs $network $remote_fs
# Default-Start:  2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop MySQL
# Description: MySQL is a very fast and reliable SQL database engine.
### END INIT INFO

so when I remove named from chkconfig and have there just mysql, it starts with order number 84: /etc/rc3.d/S84mysql -> ../init.d/mysql

but when I add named inside chkconfig it's order changes to 93: /etc/rc3.d/S93mysql -> ../init.d/mysql

as a result mysql will be starting after named and named will fail (no sql available)

any ideas what I'm doing wrong?

here is what I have in named init script

# chkconfig: 345 90 16
# description: named (BIND) is a Domain Name Server (DNS) \
# that is used to resolve host names to IP addresses.
# probe: true

### BEGIN INIT INFO
# Provides: $named
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $network $syslog
# Default-Start:2 3 4
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: start|stop|status|restart|try-restart|reload|force-reload DNS     server
# Description: control ISC BIND implementation of DNS server
### END INIT INFO

thanks, Dmitry

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Per the chkconfig(8) manpage, it favors LSB Required-Start and Required-Stop over the # chkconfig: line, if it is available:

Note that default entries in LSB-delimited 'INIT INFO' sections take
precedence over the default runlevels in the initscript; if any
Required-Start or Required-Stop entries are present, the start and
stop priorities of the script will be adjusted to account for these
dependencies.

You should be able to add mysql to the Required-Start section of the named LSB INIT INFO section and re-add it using chkconfig --add.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.