mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-08 14:41:51 +00:00
units: conditionalize static device node logic on CAP_SYS_MODULES instead of CAP_MKNOD
npsawn containers generally have CAP_MKNOD, since this is required to make PrviateDevices= work. Thus, it's not useful anymore to conditionalize the kmod static device node units. Use CAP_SYS_MODULES instead which is not available for nspawn containers. However, the static device node logic is only done for being able to autoload modules with it, and if we can't do that there's no point in doing it. (cherry picked from commite0c74691c4) (cherry picked from commitfce5e80589) Conflicts: units/systemd-tmpfiles-setup-dev.service.in
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
bf5aa798d9
commit
734ab69b24
@@ -9,7 +9,7 @@
|
||||
Description=Create list of required static device nodes for the current kernel
|
||||
DefaultDependencies=no
|
||||
Before=sysinit.target systemd-tmpfiles-setup-dev.service
|
||||
ConditionCapability=CAP_MKNOD
|
||||
ConditionCapability=CAP_SYS_MODULE
|
||||
ConditionPathExists=/lib/modules/%v/modules.devname
|
||||
|
||||
[Service]
|
||||
|
||||
@@ -10,7 +10,7 @@ Description=Create static device nodes in /dev
|
||||
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
|
||||
DefaultDependencies=no
|
||||
Before=sysinit.target local-fs-pre.target systemd-udevd.service
|
||||
ConditionCapability=CAP_MKNOD
|
||||
ConditionCapability=CAP_SYS_MODULE
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
||||
Reference in New Issue
Block a user