Commit Graph

12 Commits

Author SHA1 Message Date
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Zbigniew Jędrzejewski-Szmek 265c14cd40 Rename tmpfiles.d/kmod.conf to static-nodes.conf
It is generated using kmod, but apart from that doesn't have
much to do with kmod.
2019-08-19 11:05:58 +02:00
Zbigniew Jędrzejewski-Szmek a7df2d1e43 Add SPDX license headers to unit files 2017-11-19 19:08:15 +01:00
Martin Pitt 6233c794b2 kmod-static-nodes: don't run if module list is empty
With this kmod commit, modules.devname will be empty by default instead of
containing just a comment:

  https://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/?id=4c30a11d5f

Refine the startup condition of kmod-static-nodes.service to not run needlessly
if the list is empty.
2016-01-11 16:26:17 +01:00
Lennart Poettering e0c74691c4 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.
2014-07-04 03:24:41 +02:00
Tom Gundersen a18535d9e1 static-nodes: don't call mkdir
This is no longer necessary with kmod-15. Bump the requirement.
2013-10-17 19:53:44 +02:00
Dave Reisner 8083d486d0 kmod-static-nodes: condition execution on modules.devname 2013-09-28 14:51:39 -04:00
Khem Raj 67c15b9a7a use CAP_MKNOD ConditionCapability
Fixes errors seen when booting VMs on QEMU like

systemd[1]: kmod-static-nodes.service: main process exited, code=exited, status=203/EXEC
systemd[1]: Failed to start Create list of required static device nodes for the current kernel.
systemd[1]: Unit kmod-static-nodes.service entered failed state.

Make sure that mknod capability is available

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2013-08-22 00:52:14 -04:00
Zbigniew Jędrzejewski-Szmek 219061dc52 units: disable kmod-static-nodes.service in containers
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=998122.

Note: upstream kmod has a patch [1] to exit with a warning if
modules.devname is missing. We could use new %v specifier to make this
service conditional on the existence of this file, but this could
mask a kernel installation error, hence we should let kmod run
even if the file doesn't exist.

[1] http://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/?id=ae17710117
2013-08-20 21:18:00 -04:00
Tom Gundersen 7e380bba1c kmod-static-nodes: remain after exit 2013-07-22 17:11:19 +02:00
Tom Gundersen 3d56f7df44 static-nodes: don't hardcode path to mkdir 2013-07-12 20:08:31 +02:00
Tom Gundersen edeb68c53f static-nodes: move creation of static nodes from udevd to tmpfiles
As of kmod v14, it is possible to export the static node information from
/lib/modules/`uname -r`/modules.devname in tmpfiles.d(5) format.

Use this functionality to let systemd-tmpfilesd create the static device nodes
at boot, and drop the functionality from systemd-udevd.

As an effect of this we can move from systemd-udevd to systemd-tmpfiles-setup-dev:

 * the conditional CAP_MKNOD (replaced by checking if /sys is mounted rw)
 * ordering before local-fs-pre.target (see 89d09e1b5c)
2013-07-08 21:26:24 +02:00