#! /bin/sh
#
# mountsh4	Mount sh4 root as usb.
#
# chkconfig: S 39 0
#

if [ -f /lib/modules/$(uname -r)/kernel/fs/yaffs2/yaffs.ko ]; then
	MOUNT=$(mount | grep "/media/sh4 ")
	if [ -z "$MOUNT" ]; then
		modprobe yaffs
		if [ ! -d /media/sh4 ]; then
			mkdir /media/sh4
		fi 
		echo "Mount /dev/mtdblock4 on /media/sh4"
		mount -t yaffs2 /dev/mtdblock4 /media/sh4
	fi
fi

