# rc script for mISDN driver
MODPROBE=modprobe
RMMOD=rmmod
INSMOD=insmod

case "$1" in
	start|--start)
		$MODPROBE mISDN_core
		$MODPROBE mISDN_l1 debug=0
		$MODPROBE mISDN_l2 debug=0
		$MODPROBE l3udss1 
		$MODPROBE mISDN_dsp debug=0 options=0x0

		$MODPROBE hfcmulti type=0x08 layermask=0xf,0xf,0x3,0x3,0x3,0x3,0xf,0xf protocol=0x2,0x2,0x12,0x12,0x12,0x12,0x2,0x2

		sleep 1
		;;
	stop|--stop)
		$RMMOD hfcmulti
		$RMMOD mISDN_dsp
		$RMMOD l3udss1
		$RMMOD mISDN_l2
		$RMMOD mISDN_l1
		$RMMOD mISDN_core
		;;
	restart|--restart)
		sh $0 stop
		sleep 2 # some phones will release tei when layer 1 is down
		sh $0 start
		;;
	help|--help)
		echo "Usage: $0 {start|stop|restart|help}"
		exit 0
		;;
	*)
		echo "Usage: $0 {start|stop|restart|help}"
		exit 2
		;;

esac
