aboutsummaryrefslogtreecommitdiffstats
path: root/package
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
commit6532b286ba487f4331e0898dbe27241bb7984cd0 (patch)
treecf3b98887757a62de0c8f129497fe222ee67942b /package
parent88ac1b73412434629b528089be83d553b6f48176 (diff)
downloadupstream-6532b286ba487f4331e0898dbe27241bb7984cd0.tar.gz
upstream-6532b286ba487f4331e0898dbe27241bb7984cd0.tar.bz2
upstream-6532b286ba487f4331e0898dbe27241bb7984cd0.zip
clean up the mtd unlocking
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7199 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-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 2006f0128e..a77a7f6453 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 /
+ }
}