mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 00:51:24 +03:00
e0c74691c4
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.
19 lines
672 B
SYSTEMD
19 lines
672 B
SYSTEMD
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Create list of required static device nodes for the current kernel
|
|
DefaultDependencies=no
|
|
Before=sysinit.target systemd-tmpfiles-setup-dev.service
|
|
ConditionCapability=CAP_SYS_MODULE
|
|
ConditionPathExists=/lib/modules/%v/modules.devname
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=@KMOD@ static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
|