aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/modloop.initd
diff options
context:
space:
mode:
authorReid Rankin <reidrankin@gmail.com>2020-02-13 14:58:40 -0500
committerAriadne Conill <ariadne@dereferenced.org>2020-02-27 00:21:52 +0000
commit6b590f845bd6d16445db0cffc30e003f22d285ba (patch)
treeda64241283b24894868f52a47b7d993f654a1613 /main/openrc/modloop.initd
parent6354738b7740f72dbb29b36da280d4bb43833b04 (diff)
main/openrc: don't shadow /lib/modules if modloop is an overlay
In the run-from-RAM scenario, the modloop init script runs after APK has already installed packages. If any of these packages contain files that live under /lib/modules, /etc/init.d/modloop will hide them by mounting the modloop on top of this directory, even if overlayfs is available. This change places the pre-modloop contents of /lib/modules into the overlay stack, on top of the actual contents of the modloop file, so that in a conflict package contents override modloop contents.
Diffstat (limited to 'main/openrc/modloop.initd')
-rwxr-xr-xmain/openrc/modloop.initd2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/openrc/modloop.initd b/main/openrc/modloop.initd
index a815d66f5a4..ce9578015e9 100755
--- a/main/openrc/modloop.initd
+++ b/main/openrc/modloop.initd
@@ -116,7 +116,7 @@ start() {
mkdir -p /.modoverlayfs /lib/modules
mount -t tmpfs $mount_ops tmpfs /.modoverlayfs
mkdir -p /.modoverlayfs/modules /.modoverlayfs/work
- mount -t overlay -o upperdir=/.modoverlayfs/modules,lowerdir=/.modloop/modules,workdir=/.modoverlayfs/work overlay /lib/modules
+ mount -t overlay -o upperdir=/.modoverlayfs/modules,lowerdir=/lib/modules:/.modloop/modules,workdir=/.modoverlayfs/work overlay /lib/modules
eend $? || return 1
else
rm -rf /lib/modules && ln -sf /.modloop/modules /lib/