From: nbd Date: Mon, 21 Sep 2015 17:43:12 +0000 (+0000) Subject: base-files: fix ramoverlay function with kernels 3.18+ X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=b1674dfc2f6ba6a4ce59edabd9164b3b084af8af;p=15.05%2Fopenwrt.git base-files: fix ramoverlay function with kernels 3.18+ Even though there are not many users left within the OpenWrt tree it seems this function broke during the kernel 3.18 transition. Fix it by providing a workdir as required by overlayfs. Signed-off-by: Helmut Schaa Backport of r47015 git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@47016 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/base-files/files/lib/functions/preinit.sh b/package/base-files/files/lib/functions/preinit.sh index db1f298c8b..57862a11f3 100644 --- a/package/base-files/files/lib/functions/preinit.sh +++ b/package/base-files/files/lib/functions/preinit.sh @@ -75,13 +75,14 @@ pivot() { # } } -fopivot() { # - /bin/mount -o noatime,lowerdir=/,upperdir=$1 -t overlayfs "overlayfs:$1" /mnt - pivot /mnt $2 +fopivot() { # + /bin/mount -o noatime,lowerdir=/,upperdir=$1,workdir=$2 -t overlay "overlayfs:$1" /mnt + pivot /mnt $3 } ramoverlay() { mkdir -p /tmp/root /bin/mount -t tmpfs -o noatime,mode=0755 root /tmp/root - fopivot /tmp/root /rom 1 + mkdir -p /tmp/root/root /tmp/root/work + fopivot /tmp/root/root /tmp/root/work /rom 1 }