#!/bin/sh
#
# Starts dropbear sshd.
#

# Make sure the dropbearkey progam exists
[ -f /wr/bin/wrsw_hal ] || exit 0

start() {
 	echo -n "Starting WR Hardware Abstraction Layer daemon: "
	LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/wr/lib" /wr/bin/wrsw_hal -d -f -c /wr/etc/wrsw_hal.conf
#	/wr/bin/wrsw_rtud -d
}
stop() {
	killall wrsw_rtud
	killall wrsw_hal
}

restart() {
	stop
	start
}

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart|reload)
  	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|restart}"
	exit 1
esac

exit $?

