From f66285fb2f41392107822095e2580bfa604a785e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 15 Feb 2006 18:42:53 +0000 Subject: [PATCH] fix rootfs mount after 'mtd erase OpenWrt' SVN-Revision: 3244 --- openwrt/package/base-files/default/sbin/mount_root | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/openwrt/package/base-files/default/sbin/mount_root b/openwrt/package/base-files/default/sbin/mount_root index 5f9ae37a87..3707920ed4 100755 --- a/openwrt/package/base-files/default/sbin/mount_root +++ b/openwrt/package/base-files/default/sbin/mount_root @@ -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 -- 2.30.2