1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-12-22 10:32:24 +02:00

nanonote-files: mtd.nn: improvement on mount

This commit is contained in:
Xiangfu 2012-10-15 22:04:54 +08:00
parent 6a2b91479c
commit f7f72e3071

View File

@ -1,6 +1,6 @@
#!/bin/sh
__VERSION__=2011-03-07
__VERSION__=2012-10-15
if [ "$1" == "flash" ] && [ "$#" == "3" ]; then
case "$2" in
@ -43,8 +43,8 @@ if [ "$1" == "mount" ] && [ "$#" == "3" ]; then
exit 1
fi
ubiattach /dev/ubi_ctrl -m ${PARTITION}
DEV_UBI=`dmesg | grep "UBI: attached mtd${PARTITION} to" | cut -d ":" -f 2 | cut -d " " -f 5`
ubiattach /dev/ubi_ctrl -m ${PARTITION} > /dev/null 2>&1
DEV_UBI=`dmesg | grep "UBI: attached mtd${PARTITION} to" | tail -n 1 | cut -d ":" -f 2 | cut -d " " -f 5`
mount -t ubifs ${DEV_UBI}_0 $MOUNT_POINT
exit 0
fi