aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/modloop.initd
diff options
context:
space:
mode:
authorMark White <mark@celos.net>2016-02-21 00:32:44 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-02-22 16:46:40 +0000
commit945bf9e18b6cc6525aeee325047d9e7a833fa879 (patch)
tree09ccd81e16cecab623886b9b991fce28c1b6f581 /main/openrc/modloop.initd
parentca661f064fe894af1b2f36466953d8932c770f9b (diff)
downloadaports-945bf9e18b6cc6525aeee325047d9e7a833fa879.tar.bz2
aports-945bf9e18b6cc6525aeee325047d9e7a833fa879.tar.xz
main/openrc: use overlayfs instead of unionfs for modloop
fixes #5144
Diffstat (limited to 'main/openrc/modloop.initd')
-rw-r--r--main/openrc/modloop.initd13
1 files changed, 7 insertions, 6 deletions
diff --git a/main/openrc/modloop.initd b/main/openrc/modloop.initd
index f88d0a5755..392569a48d 100644
--- a/main/openrc/modloop.initd
+++ b/main/openrc/modloop.initd
@@ -86,12 +86,13 @@ start() {
fi
fi
- #use unionfs is available and configured
- if grep -q -w "unionfs$" /proc/filesystems && [ -n "$unionfs_size" ]; then
- ebegin "UnionFS detected. Mounting modloop rw"
- mkdir -p /.modunisonfs/modules /lib/modules
- mount -t tmpfs -o size="$unionfs_size" tmpfs /.modunisonfs/modules
- mount -t unionfs -o dirs=/.modunisonfs/modules=rw:/.modloop/modules=ro unionfs /lib/modules
+ #use overlayfs if available and configured
+ if grep -q -w "overlay$" /proc/filesystems && [ -n "$unionfs_size" ]; then
+ ebegin "OverlayFS detected, mounting modloop rw"
+ mkdir -p /.modunisonfs /lib/modules
+ mount -t tmpfs -o size="$unionfs_size" tmpfs /.modunisonfs
+ mkdir -p /.modunisonfs/modules /.modunisonfs/work
+ mount -t overlay -o upperdir=/.modunisonfs/modules,lowerdir=/.modloop/modules,workdir=/.modunisonfs/work overlay /lib/modules
eend $? || return 1
else
rm -rf /lib/modules && ln -sf /.modloop/modules /lib/