mini_fo works
authorMike Baker <mbm@openwrt.org>
Tue, 18 Apr 2006 04:33:39 +0000 (04:33 +0000)
committerMike Baker <mbm@openwrt.org>
Tue, 18 Apr 2006 04:33:39 +0000 (04:33 +0000)
SVN-Revision: 3669

openwrt/package/base-files/default/bin/firstboot
openwrt/package/base-files/default/etc/init.d/S99done
openwrt/package/base-files/default/etc/preinit

index 46106e0e4456dff171b16d5ee45c134c858ec6e7..7bbf014b5a7d0b373833fa141e9194ca7b8a16ef 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
+               mount -o move $2/jffs /jffs 2>&-
                return 0
        }
 }
@@ -51,7 +52,7 @@ mountdp() { # <device> <mount_point> <ignored> <fs>
 fopivot() { # <rw_root> <ro_root> <dupe?>
        root=$1
        {
-               mount -t mini_fo -o base=/,sto=$1 none /mnt 2>&- && root=/mnt
+               mount -t mini_fo -o base=/,sto=$1 $1 /mnt 2>&- && root=/mnt
        } || {
                [ "$3" = "1" ] && mount -o bind $1 $1 && dupe $1 $rom
        }
index e41d4e698c4244d41a5568d1ba00fce3815e0176..f49d3103a12f80148d2701081e2f1febf85d6026 100755 (executable)
@@ -3,7 +3,7 @@ sysctl -p >&-
 
 # automagically run firstboot
 [ "$(nvram get no_root_swap)" != 1 ] && {
-       { mount|grep "on / type tmpfs" 1>&-; } && {
+       [ -d /tmp/root ] && {
                lock /tmp/.switch2jffs
                firstboot switch2jffs
                lock -u /tmp/.switch2jffs
index 04454f8a95621c4dda928a08f31c028003cc57dd..cf3bfdea51938aab9373f71d0aee9c86f7c9d8d6 100755 (executable)
@@ -55,6 +55,7 @@ else
        }
 fi
 
+insmod mini_fo 2>&-
 mount_root ${FAILSAFE:+failsafe}
 
 exec /sbin/init