All pastes #12594 Raw Edit

Something

public text v1 · immutable
#12594 ·published 2005-05-25 11:10 UTC
rendered paste body
if (test $1) then
	if (test $1 = "eject") then 
		if (test "$mmc_present" != "0") then
			umount /mmc && rmdir /mmc
			rmmod mmc.o
			rmmod vfat.o
			rmmod fat.o
			mmc_present=0
		else 
 			echo "MMC Card not present!"
		fi
	elif (test $1 = "insert") then 
		if (test "$mmc_present" != "1") then
			insmod -q fat.o
			insmod -q vfat.o
			insmod -q mmc.o
			mkdir -p /mmc
			mount /dev/mmc/disc0/part1  /mmc
			mmc_present=1
		else 
			 echo "MMC Card already present!"
		fi
	else
		echo "Usage: mmc <insert|eject>"
	fi
else
	echo "Usage: mmc <insert|eject>"
fi