diff options
Diffstat (limited to 'main/openrc/modloop.initd')
-rw-r--r-- | main/openrc/modloop.initd | 13 |
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/ |