fix a bug that prevents the wgt634u from initializing the filesystem properly
authorMike Baker <mbm@openwrt.org>
Sat, 8 Apr 2006 21:11:49 +0000 (21:11 +0000)
committerMike Baker <mbm@openwrt.org>
Sat, 8 Apr 2006 21:11:49 +0000 (21:11 +0000)
SVN-Revision: 3601

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

index 0b3552fb1258f21398ef814847329b92e69d56b1..44441b0ec0f3fc28adb6ac99582239c51e106541 100755 (executable)
@@ -37,6 +37,7 @@ pivot() { # <new_root> <old_root>
        pivot_root $1 $1$2 && {
                mount -o move $2/dev /dev
                mount -o move $2/tmp /tmp
+               return 0
        }
 }
 
index ed7391539634f82ed72c7bf342607d9adb97ca76..48a9553009d58847d934a2a395edf887cbc5462d 100755 (executable)
@@ -22,9 +22,13 @@ if [ "$1" != "failsafe" -a "$(nvram get no_root_swap)" != 1 ]; then
                . /bin/firstboot
                is_dirty 
                [ $? != 0 ] && {
-                       mount /dev/mtdblock/4 /jffs
+                       echo "switching to jffs2"
+                       mount /dev/mtdblock/4 /jffs -t jffs2
                        pivot /jffs /rom
-               } || ramoverlay
+               } || {
+                       echo "jffs2 unusable; using ramdisk"
+                       ramoverlay
+               }
        fi
 fi