forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemd: align kmod-static-nodes.service with kmod paths
- Loading branch information
Showing
1 changed file
with
15 additions
and
10 deletions.
There are no files selected for viewing
25 changes: 15 additions & 10 deletions
25
...os-specific/linux/systemd/0016-kmod-static-nodes.service-Update-ConditionFileNotEmp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
From bee1d855d4fb7f2d6f6b9beb1dfd14b1dea31887 Mon Sep 17 00:00:00 2001 | ||
From 775a2a8940c07f4af33a2a11bfa17e0257b427cb Mon Sep 17 00:00:00 2001 | ||
From: Florian Klink <[email protected]> | ||
Date: Sat, 7 Mar 2020 22:40:27 +0100 | ||
Subject: [PATCH 16/21] kmod-static-nodes.service: Update ConditionFileNotEmpty | ||
Subject: [PATCH 16/19] kmod-static-nodes.service: Update ConditionFileNotEmpty | ||
|
||
On NixOS, kernel modules of the currently booted systems are located at | ||
/run/booted-system/kernel-modules/lib/modules/%v/, not /lib/modules/%v/. | ||
kmod loads modules from not only /lib/modules but also from | ||
/run/booted-system/kernel-modules/lib/modules and | ||
/run/current-system/kernel-modules/lib/module | ||
|
||
Co-authored-by: Arian van Putten <[email protected]> | ||
--- | ||
units/kmod-static-nodes.service.in | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
units/kmod-static-nodes.service.in | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/units/kmod-static-nodes.service.in b/units/kmod-static-nodes.service.in | ||
index 777e82d16b..b6abc2bba0 100644 | ||
index 777e82d16b..9a5e05a1cc 100644 | ||
--- a/units/kmod-static-nodes.service.in | ||
+++ b/units/kmod-static-nodes.service.in | ||
@@ -12,7 +12,7 @@ Description=Create List of Static Device Nodes | ||
@@ -12,7 +12,9 @@ Description=Create List of Static Device Nodes | ||
DefaultDependencies=no | ||
Before=sysinit.target systemd-tmpfiles-setup-dev.service | ||
ConditionCapability=CAP_SYS_MODULE | ||
-ConditionFileNotEmpty=/lib/modules/%v/modules.devname | ||
+ConditionFileNotEmpty=/run/booted-system/kernel-modules/lib/modules/%v/modules.devname | ||
+ConditionFileNotEmpty=|/lib/modules/%v/modules.devname | ||
+ConditionFileNotEmpty=|/run/booted-system/kernel-modules/lib/modules/%v/modules.devname | ||
+ConditionFileNotEmpty=|/run/current-system/kernel-modules/lib/modules/%v/modules.devname | ||
|
||
[Service] | ||
Type=oneshot | ||
-- | ||
2.33.0 | ||
2.33.1 | ||
|