--- /dev/null
+#!/bin/sh
+VER=1.0
+# ============================================================================
+#
+# Copyright (C) THALES. All rights reserved
+# Author: Thomas Perennou (Viveris Technologies)
+# Date : 03/12/2014
+# ============================================================================
+
+### BEGIN INIT INFO
+# Provides: waitswithes
+# Required-Start: $network
+# Required-Stop:
+# Should-Start:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# 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
+TIMEOUT=360
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+[ -f /etc/default/waitswitches ] && . /etc/default/waitswitches
+[ -x $SCRIPT ] || exit 1
+[ "$ENABLE" = "yes" ] || exit 0
+
+. /lib/lsb/init-functions
+
+do_start () {
+ log_action_msg "Wait all switches"
+ $SCRIPT -t $TIMEOUT -w
+}
+
+case "$1" in
+ -v)
+ echo "$(basename $0), version $VER"
+ ;;
+ start)
+ do_start
+ ;;
+ restart|reload|force-reload)
+ echo "Error: argument '$1' not supported" >&2
+ exit 3
+ ;;
+ stop)
+ # No-op
+ ;;
+ *)
+ echo "Usage: $0 start|stop" >&2
+ exit 3
+ ;;
+esac
+
+# vim:set tabstop=4 expandtab shiftwidth=4: