#! /bin/sh
#
# mptctlnode        This script keeps the mptctl device node 
#                   up to date with the proper major number.
#
# chkconfig: 35 2 2 
# description: keeps the mptctl device node up to date with \
#              the proper major number.

mptctlpath=/dev/mptctl
minor=0

start() {
        rm -f $mptctlpath
        major=`awk '{ if ($2 == "mptctl") print $1; }' /proc/devices`
        if [ -n "$major" ]; then
           mknod $mptctlpath c $major $minor
        fi
	return 0
}

stop() {
	return 0
}

restart() {
	stop
	start
}

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

exit $?
