#! /bin/bash
#
# Version: 2.0
# The following is for Redhat
#
#chkconfig: 2345 80 20
#description: Starts /Stops The LSI Logic MPTCTL driver module
#processname:
#
#  The following is for SuSE
#
### BEGIN INIT INFO
# Provides:         mptctl
# Required-Start:   
# Required-Stop:
# Default-Start:  2 3 5
# Default-Stop:   0 1 6 
# Description:    Starts/Stops The LSI Logic MPTCTL driver module 
### END INIT INFO #
#


start() {
    echo $"Starting mptctl"
        modprobe mptctl
        # if the special character device for
        # IOCTLs doesnt exist create 
        if [ ! -c /dev/mptctl ]; then
            mknod /dev/mptctl c 10 220
        fi
}


#see how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  *)
	echo $"Usage $0 {start|stop}"
	exit 1
esac

exit $?
