Enable kmod-static-nodes.service

This creates static device nodes such as /dev/fuse or
/dev/snd/seq. The kernel modules for these devices will be loaded on
demand when the device node is opened.
This commit is contained in:
Eelco Dolstra 2014-04-17 14:35:05 +02:00
parent 9594421617
commit 7ea51b1c6c
2 changed files with 18 additions and 0 deletions

View File

@ -147,6 +147,12 @@ in
config = mkIf (!config.boot.isContainer) {
systemd.services.kmod-static-nodes =
{ wantedBy = [ "sysinit.target" ];
baseUnit = "${config.systemd.package}/example/systemd/system/kmod-static-nodes.service";
environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
};
system.build = { inherit kernel; };
system.modulesTree = [ kernel ] ++ config.boot.extraModulePackages;

View File

@ -181,6 +181,18 @@ index aa853b8..8bcc647 100644
Type=idle
Restart=always
RestartSec=0
diff --git a/units/kmod-static-nodes.service.in b/units/kmod-static-nodes.service.in
index 368f980..d0c1bd2 100644
--- a/units/kmod-static-nodes.service.in
+++ b/units/kmod-static-nodes.service.in
@@ -10,7 +10,6 @@ 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
-ConditionPathExists=/lib/modules/%v/modules.devname
[Service]
Type=oneshot
diff --git a/units/local-fs.target b/units/local-fs.target
index ae3cedc..0e36840 100644
--- a/units/local-fs.target