From: Michael Biebl <bi...@debian.org>

Creating the list of dead device nodes requires kmod. Inside containers
this is not strictly required so we don't want a hard dependency on the
kmod package. If the binary does not exist kmod-static-nodes.service
will fail, so add a condition to check if the binary is available.
---
 units/kmod-static-nodes.service.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/units/kmod-static-nodes.service.in 
b/units/kmod-static-nodes.service.in
index 0934a87..076e316 100644
--- a/units/kmod-static-nodes.service.in
+++ b/units/kmod-static-nodes.service.in
@@ -11,6 +11,7 @@ DefaultDependencies=no
 Before=sysinit.target systemd-tmpfiles-setup-dev.service
 ConditionCapability=CAP_SYS_MODULE
 ConditionPathExists=/lib/modules/%v/modules.devname
+ConditionFileIsExecutable=@KMOD@
 
 [Service]
 Type=oneshot
-- 
2.0.1

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to