summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2007-05-13 09:39:21 +0000
committerMike Baker <mbm@openwrt.org>2007-05-13 09:39:21 +0000
commite4c6078c6788530bc88eb6790e70d5a5b363a344 (patch)
tree79dbb9a7bf473eab3fb076b43880ba5879a37e4b
parentd39adea0f7e9a6ce8eccf87faab4cf3fcae2a809 (diff)
downloadmtk-20170518-e4c6078c6788530bc88eb6790e70d5a5b363a344.zip
mtk-20170518-e4c6078c6788530bc88eb6790e70d5a5b363a344.tar.gz
mtk-20170518-e4c6078c6788530bc88eb6790e70d5a5b363a344.tar.bz2
clean up the mtd unlocking
SVN-Revision: 7199
-rwxr-xr-xpackage/base-files/files/sbin/mount_root25
1 files changed, 13 insertions, 12 deletions
diff --git a/package/base-files/files/sbin/mount_root b/package/base-files/files/sbin/mount_root
index 2006f01..a77a7f6 100755
--- a/package/base-files/files/sbin/mount_root
+++ b/package/base-files/files/sbin/mount_root
@@ -41,18 +41,19 @@ jffs2_ready () {
}
[ failsafe != "$1" ] && {
- grep rootfs /proc/mtd >/dev/null 2>/dev/null && {
- mtd unlock rootfs
- grep rootfs_data /proc/mtd >/dev/null 2>/dev/null && {
- . /bin/firstboot
- jffs2_ready && {
- echo "switching to jffs2"
- mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2 && \
+ grep rootfs_data /proc/mtd >/dev/null 2>/dev/null && {
+ . /bin/firstboot
+ mtd unlock rootfs_data
+ jffs2_ready && {
+ echo "switching to jffs2"
+ mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2 && \
fopivot /jffs /rom
- } || {
- echo "jffs2 not ready yet; using ramdisk"
- ramoverlay
- }
+ } || {
+ echo "jffs2 not ready yet; using ramdisk"
+ ramoverlay
}
- } || mount -o remount,rw /dev/root /
+ } || {
+ mtd unlock rootfs
+ mount -o remount,rw /dev/root /
+ }
}