how to define service runlevel order position?

Posted by DmitrySemenov on Server Fault See other posts from Server Fault or by DmitrySemenov
Published on 2012-04-15T23:05:29Z Indexed on 2012/04/15 23:32 UTC
Read the original article Hit count: 301

Filed under:
|
|

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

© Server Fault or respective owner

Related posts about mysql

Related posts about named

  • How to allow bind in app armor?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    Question: I did setup bind9 as described here: http://ubuntuforums.org/showthread.php?p=12149576#post12149576 Now I have a little problem with apparmor: If I switch it off, it works. If apparmor runs, it doesn't work, and I get the following dmesg output: [ 23.809767] type=1400 audit(1344097913… >>> More

  • MAMP + Python MySQLDB - trouble installing

    as seen on Server Fault - Search for 'Server Fault'
    I'm currently running the latest version of MAMP on my Snow Leopard OSX, and I'm trying to install MySQLDB. Downloaded: MySQL-python-1.2.3c1 I went into the setup_posix.py and adjusted the location of the mysql_config to the one in MAMP: mysql_config.path = "/Applications/MAMP/Library/bin/mysql_config" When… >>> More

  • Building Awesome WM

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. After running cd awesome-3.4 && make I get the following missing dependencies error: Running… >>> More

  • Building Awesome WM

    as seen on Server Fault - Search for 'Server Fault'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. EDIT I ran: sudo apt-get install libxcb-xtest0-dev libxcb-property1-dev libxdg-basedir-dev libstartup-notification0-dev… >>> More

  • Building Awesome WM

    as seen on Super User - Search for 'Super User'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. EDIT I ran: sudo apt-get install libxcb-xtest0-dev libxcb-property1-dev libxdg-basedir-dev libstartup-notification0-dev… >>> More