# Provides: waitslaves
# Required-Start: $network $sshd isc-dhcp-server atftpd nfs-kernel-server wakeonlan etherwake ipmiwake
# Required-Stop:
-# Should-Start:
-# Default-Start: S
-# Default-Stop:
+# Should-Start:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
# Short-Description: Wait cluster slave blades
# Description: Wait for all cluster slave blades are ready for running
### END INIT INFO
ENABLE="yes"
-SCRIPT=/opt/trc6500/script/check_network.sh
+SCRIPTS="/opt/script/check_network /opt/trc6500/script/check_network"
+SCRIPT=
TIMEOUT=360
PATH=/sbin:/usr/sbin:/bin:/usr/bin
[ -f /etc/default/waitslaves ] && . /etc/default/waitslaves
-[ -x $SCRIPT ] || exit 1
+for s in $SCRIPTS; do [ -x $s ] && SCRIPT=$s; done
+[ -x "$SCRIPT" ] || exit 1
[ "$ENABLE" = "yes" ] || exit 0
. /lib/lsb/init-functions
do_start () {
- log_action_msg "Waite all slave blades"
- $SCRIPT -t $TIMEOUT -w -c 'test -e /home/trc6500 && echo ok'
+ log_action_msg "Wait all slave blades"
+ $SCRIPT -t $TIMEOUT -x -w -c 'test -e /home/trc6500 && echo ok'
}
case "$1" in