new variable "no_root_swap" to prevent squashfs from mounting jffs2
authorMike Baker <mbm@openwrt.org>
Sun, 17 Jul 2005 05:47:42 +0000 (07:47 +0200)
committerMike Baker <mbm@openwrt.org>
Mon, 21 Mar 2016 12:37:59 +0000 (13:37 +0100)
SVN-Revision: 1480

openwrt/target/default/target_skeleton/sbin/mount_root

index eef55b4bdb544dabf845daa0bf3499229239a08d..a551f2ef9c3bd673c82abe0cd69bc36139c3249d 100755 (executable)
@@ -12,12 +12,14 @@ if [ "$1" != "failsafe" ]; then
                        mount -o remount,rw /dev/root /
                fi
        else
-               mtd unlock OpenWrt
-               mount -t jffs2 /dev/mtdblock/4 /jffs
-               pivot_root /jffs /jffs/rom
-               mount none /proc -t proc
-               mount none /dev -t devfs
-               umount /rom/proc rom/dev >&-
+               if [ -z "$(nvram get no_root_swap)" ]; then
+                       mtd unlock OpenWrt
+                       mount -t jffs2 /dev/mtdblock/4 /jffs
+                       pivot_root /jffs /jffs/rom
+                       mount none /proc -t proc
+                       mount none /dev -t devfs
+                       umount /rom/proc rom/dev >&-
+               fi
        fi
 fi
 mount none /tmp -t tmpfs size=50%