我已经添加了两个服务 A 和 B。B 依赖于 A 意味着如果我将启动 B,那么如果 A 尚未运行,则应该自动启动它。但是当我启动 B 时,A 不会自动出现。
你能告诉我哪里错了吗?我已经提到了下面两个服务的初始化脚本。
B 初始化脚本:
#!/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