我设置bind-dlz并且需要mysql启动之前NAMED当系统启动这里是我有
[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
这里是我在MySQL的初始化脚本
# 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
所以当我从chkconfig中删除命名并且只有mysql的时候,它就从命令号84开始:/etc/rc3.d/S84mysql – > ../init.d/mysql
但是当我在chkconfig中添加命名时,它的顺序更改为93:/etc/rc3.d/S93mysql – > ../init.d/mysql
作为一个结果MySQL将启动后命名和命名将失败(没有SQL可用)
任何想法我做错了什么?
这是我在命名init脚本中的
# 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
谢谢,德米特里
根据chkconfig(8)联机帮助页,如果可用,它将倾向于通过# chkconfig:行的LSB Required-Start和Required-Stop :
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.
您应该可以将mysql添加到named LSB INIT INFO部分的Required-Start部分,并使用chkconfig --add重新添加它。