1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 06:20:16 +02:00

clean up the mtd unlocking

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7199 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mbm 2007-05-13 09:39:21 +00:00
parent f28f5c32a7
commit 6853d4d1ef

View File

@ -41,18 +41,19 @@ jffs2_ready () {
} }
[ failsafe != "$1" ] && { [ failsafe != "$1" ] && {
grep rootfs /proc/mtd >/dev/null 2>/dev/null && { grep rootfs_data /proc/mtd >/dev/null 2>/dev/null && {
mtd unlock rootfs . /bin/firstboot
grep rootfs_data /proc/mtd >/dev/null 2>/dev/null && { mtd unlock rootfs_data
. /bin/firstboot jffs2_ready && {
jffs2_ready && { echo "switching to jffs2"
echo "switching to jffs2" mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2 && \
mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2 && \
fopivot /jffs /rom fopivot /jffs /rom
} || { } || {
echo "jffs2 not ready yet; using ramdisk" echo "jffs2 not ready yet; using ramdisk"
ramoverlay ramoverlay
}
} }
} || mount -o remount,rw /dev/root / } || {
mtd unlock rootfs
mount -o remount,rw /dev/root /
}
} }