diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-09-21 17:41:07 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-09-21 17:41:07 +0000 |
commit | b38194406f8a3a3efa9e8d5177212a24af663ce6 (patch) | |
tree | 80a843cc758efc501041c5b802822f66b607ed50 /package/base-files/files/lib | |
parent | d4760cd9b4c0d4f761eedd9d6aebb369f27b347a (diff) | |
download | upstream-b38194406f8a3a3efa9e8d5177212a24af663ce6.tar.gz upstream-b38194406f8a3a3efa9e8d5177212a24af663ce6.tar.bz2 upstream-b38194406f8a3a3efa9e8d5177212a24af663ce6.zip |
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 <helmut.schaa@googlemail.com>
SVN-Revision: 47015
Diffstat (limited to 'package/base-files/files/lib')
-rw-r--r-- | package/base-files/files/lib/functions/preinit.sh | 9 |
1 files changed, 5 insertions, 4 deletions
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() { # <new_root> <old_root> } } -fopivot() { # <rw_root> <ro_root> <dupe?> - /bin/mount -o noatime,lowerdir=/,upperdir=$1 -t overlayfs "overlayfs:$1" /mnt - pivot /mnt $2 +fopivot() { # <rw_root> <work_dir> <ro_root> <dupe?> + /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 } |