ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
Blob Blame History Raw
From cdeb74502d64ea47d1751afc2de82d51ef192c88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 19 Aug 2013 16:59:42 -0400
Subject: [PATCH] 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
---
 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 cdfc6e5..98664ea 100644
--- a/units/kmod-static-nodes.service.in
+++ b/units/kmod-static-nodes.service.in
@@ -9,6 +9,7 @@
 Description=Create list of required static device nodes for the current kernel
 DefaultDependencies=no
 Before=sysinit.target systemd-tmpfiles-setup-dev.service
+ConditionVirtualization=!container
 
 [Service]
 Type=oneshot