X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/ec5075b896db066cf03f4ea4fd321602c761fe97..d08b885a8adf1e9c78e7b78fbb2dbd7830ad557f:/package/base-files/files/lib/functions/boot.sh diff --git a/package/base-files/files/lib/functions/boot.sh b/package/base-files/files/lib/functions/boot.sh index a88324135..6bdd7a149 100644 --- a/package/base-files/files/lib/functions/boot.sh +++ b/package/base-files/files/lib/functions/boot.sh @@ -78,10 +78,10 @@ find_mtd_part() { } jffs2_ready () { - mtdpart="$(find_mtd_part rootfs_data)" - [ -z "$mtdpart" ] && return 1 - magic=$(hexdump $mtdpart -n 4 -e '4/1 "%02x"') - [ "$magic" != "deadc0de" ] + mtdpart="$(find_mtd_part rootfs_data)" + [ -z "$mtdpart" ] && return 1 + magic=$(hexdump $mtdpart -n 4 -e '4/1 "%02x"') + [ "$magic" != "deadc0de" ] } dupe() { # @@ -125,7 +125,9 @@ pivot() { # fopivot() { # root=$1 { - if grep -q mini_fo /proc/filesystems; then + if grep -q overlay /proc/filesystems; then + mount -t overlayfs -olowerdir=/,upperdir=$1 "overlayfs:$1" /mnt && root=/mnt + elif grep -q mini_fo /proc/filesystems; then mount -t mini_fo -o base=/,sto=$1 "mini_fo:$1" /mnt 2>&- && root=/mnt else mount --bind / /mnt