fix rootfs mount after 'mtd erase OpenWrt'
authorFelix Fietkau <nbd@openwrt.org>
Wed, 15 Feb 2006 18:42:53 +0000 (18:42 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 15 Feb 2006 18:42:53 +0000 (18:42 +0000)
SVN-Revision: 3244

openwrt/package/base-files/default/sbin/mount_root

index 5f9ae37a87f085e38ede04bd8024aa077f2425b6..3707920ed45070f25f54454069fadbc64eb48c42 100755 (executable)
@@ -21,10 +21,13 @@ if [ "$1" != "failsafe" -a "$(nvram get no_root_swap)" != 1 ]; then
                        firstboot ramoverlay >&- 2>&-
                else
                        mount /dev/mtdblock/4 /jffs
-                       pivot_root /jffs /jffs/rom
-                       mount none /proc -t proc
-                       umount /rom/proc
-                       mount -o move /rom/dev /dev
+                       pivot_root /jffs /jffs/rom && {
+                               mount none /proc -t proc
+                               umount /rom/proc
+                               mount -o move /rom/dev /dev
+                       } || {
+                               firstboot ramoverlay
+                       }
                fi
        fi
 fi