aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/base-files/files/lib/functions/preinit.sh9
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
}