很简单一个 ,shell要注意,() 里,前后都要留空格
文件名sd_rootfs.sh
#!/bin/bash
df -h
echo -n "Enter your patition of sdcard "
read name
umount /dev/$name
echo -n "umount /dev/$name"
mkdir /sdcard
echo -n "mkdir /sdcard"
mkfs -t ext3 /dev/$name
mount /dev/$name /sdcard -t ext3
cp /home/hill/HB/nfs/* /sdcard -rf
sleep 20s
umount /sdcard
exit 0
阅读(1126) | 评论(0) | 转发(0) |