correct service
[debian6500.git] / master / etc / init.d / waitswitches
index 0a30d596e21348d410bd4fc626fa8b888763c51c..511c1aa7166da12e314be1acd6001b32d0580713 100755 (executable)
@@ -8,23 +8,25 @@ VER=1.0
 # ============================================================================
 
 ### BEGIN INIT INFO
-# Provides:          waitswithes
+# Provides:          waitswitches
 # Required-Start:    $network
 # Required-Stop:
 # Should-Start:
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
+# Default-Start:     S
+# Default-Stop:      
 # Short-Description: Wait switches
 # Description:       Wait for all switches are ready for running
 ### END INIT INFO
 
 ENABLE="yes"
-SCRIPT=/opt/trc6500/script/check_switches.sh
+SCRIPTS="/opt/script/check_switches /opt/trc6500/script/check_switches"
+SCRIPT=
 TIMEOUT=360
 
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 [ -f /etc/default/waitswitches ] && . /etc/default/waitswitches
-[ -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