unit: make sure to pull in modprobe@loop.service when RootImage= is used with DeviceAllow=
Fixes: #14214
This commit is contained in:
parent
07141aa005
commit
867af7282b
|
@ -4324,6 +4324,11 @@ int unit_patch_contexts(Unit *u) {
|
|||
r = cgroup_add_device_allow(cc, "block-blkext", "rwm");
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
/* Make sure "block-loop" can be resolved, i.e. make sure "loop" shows up in /proc/devices */
|
||||
r = unit_add_two_dependencies_by_name(u, UNIT_AFTER, UNIT_WANTS, "modprobe@loop.service", true, UNIT_DEPENDENCY_FILE);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue