#!/bin/sh # $FreeBSD: src/tools/regression/msdosfs/msdosfstest.sh,v 1.1 2005/04/08 07:21:07 silby Exp $ # A really simple script to create a swap-backed msdosfs filesystem, create # Big5 named directory, unmount/remount the filesystem, and make sure all is # well. # # Not very advanced, but better than nothing. mdconfig -a -t swap -s 128m -u 10 bsdlabel -w md10 auto newfs_msdos -F 32 -b 8192 /dev/md10a mount_msdosfs -D CP950 -L zh_TW.Big5 /dev/md10a /mnt/thumb/ mkdir /mnt/thumb/012345678_邪惡之美 umount /mnt/thumb mount_msdosfs -L zh_TW.Big5 -D CP950 /dev/md10a /mnt/thumb/ cd /mnt/thumb/012345678_邪惡之美 if [ $? -eq 0 ]; then echo "ok 2"; else echo "not ok 2"; fi echo > 是否看過坊間常見的茹芸淚海慶功宴吃蓋飯第四集.txt rm 是否看過坊間常見的茹芸淚海慶功宴吃蓋飯第四集.txt if [ $? -eq 0 ]; then echo "ok 3"; else echo "not ok 3"; fi cd / umount /mnt/thumb mdconfig -d -u 10