#!/bin/bash

### BEGIN INIT INFO
# Provides:          setup-board
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: Setup S6000 board.
### END INIT INFO

case "$1" in
start)
	echo -n "Setting up board... "

        depmod -a
        modprobe i2c_mux_gpio
        modprobe dell_s6000_platform
        modprobe w83627ehf

        /usr/local/bin/set-fan-speed 15000
        /usr/local/bin/reset-qsfp

	echo "done."
	;;

stop)
	echo "done."
        rmmod w83627ehf
        rmmod dell_s6000_platform
        rmmod i2c_mux_gpio
	;;

force-reload|restart)
	echo "Not supported"
	;;

*)
	echo "Usage: /etc/init.d/platform-modules-s6000.init {start|stop}"
	exit 1
	;;
esac

exit 0

