#!/bin/sh
progdir=$(cd $(dirname $0); pwd)
rm -f /mnt/mmc/CFW/nosdcard.flag
mkdir /mnt/SDCARD
if [ -e /dev/block/mmcblk1p1 ]
then
	SDCARD_DEVICE=/dev/block/mmcblk1p1
else
	SDCARD_DEVICE=/dev/block/mmcblk1
fi
mount -t vfat -o rw,utf8,noatime $SDCARD_DEVICE /mnt/SDCARD
if [ $? -ne 0 ]
then
	mount -t exfat -o rw,utf8,noatime $SDCARD_DEVICE /mnt/SDCARD
fi
	rm -f $progdir/Mount*
	cp -f $progdir/tf2/Mount_TF2-ON.sh $progdir/
	$progdir/tf2/printstr "   Mount TF2 - ON   "
	sleep 2
fi
sync
