#!/bin/sh
# This script is for Debian, Suse and all other systems
# save it as S99sled
# start/stop the led and shutdown daemon
#
# you should start this as first process and terminate it as the
# last one (i.e you don't actually need a kill script).
#
# action : start the sled process.
# processname: sled

[ -x /usr/sbin/sled ] || exit 0
DEVICE=/dev/led
RETVAL=0
# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo "Starting sled..."
        sled $DEVICE
	RETVAL=$?
        ;;
  stop)
        # Stop daemons.
        echo "Shutting down sled..."
	killproc sled
	RETVAL=$?
        ;;
  status)
	status sled
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
        echo "Usage: sled_rc {start|stop|restart|reload|status}"
        exit 1
esac

exit $RETVAL
