我已经添加了两个服务A和B. B依赖于A意味着如果我将启动B,那么如果A尚未运行则应该自动启动。但是当我开始B时,A不会自动出现。
你能告诉我哪里错了吗?我已经提到了以下两种服务的Init脚本。B Init脚本:
#!/bin/bash
# Author: Jsingh <jsingh@sandvine.com>
# chkconfig: 2345 95 05
# processname: B
# config: /usr/local/etc/rc.conf
# pidfile: /var/run/B.pid
### BEGIN INIT INFO
# Provides: B
# Required-Start: $local_fs $network A
# Required-Stop: $local_fs $network A
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop System daemon
# Description:
### END INIT INFO
初始化脚本:
#!/bin/bash
# Author: Jsingh <jsingh@sandvine.com>
# chkconfig: 2345 90 10
# processname: A
# config: /usr/local/etc/rc.conf
# pidfile: /var/run/A.pid
### BEGIN INIT INFO
# Provides: A
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop System daemon
# Description:
### END INIT INFO