# !/bin/sh
case $1 in 
	start)
		if [ ! -c /dev/mshd ]; then 
			mknod /dev/mshd c 140 0
		fi 
		ps -A|grep mshdd > /dev/null
		if [ $? -ne 0 ]; then 
			hw >/tmp/hw_info
			grep "2 CPUs" /tmp/hw_info >/dev/null
			if [ $? -ne 0 ]; then
				mshdd 53 57 48 53 67 63 60 68 1 70
			else 
				mshdd 53 57 48 53 67 62 60 68 2 70
			fi
		fi
		;;
	status)
		ps -A|grep mshdd > /dev/null
		if [ $? -ne 0 ];then 
			echo mshdd was not running
		else
			echo mshdd was running
		fi
		;;
	stop)
		ps -A|grep mshdd > /dev/null
		if [ $? -ne 0 ] ;then 
			echo mshdd was not running ,can not stop
			exit
		fi
		pid=""
		pid=`ps -A|sed -n /mshdd/p | awk '{print $1;}'`
		if [  -n $pid ];then
			kill  -15 $pid
			sleep 1
			control 255 255 255
		fi
		;;
	*)
	echo "Usage: mshdd_sh {start|stop|status}";;
esac


