From 9cbf1e58f9629af5c6b56777ee73dc6320306d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 5 Mar 2020 07:20:49 +0100 Subject: units: skip modprobe@.service if the unit appears to be already loaded Possible alternative to #14819. For me, setting RemainAfterExit=yes would be OK, but if people think that it might cause issues, then this could be a reasonable alternative that still let's us skip the invocation of the separate binary. --- units/modprobe@.service | 1 + 1 file changed, 1 insertion(+) diff --git a/units/modprobe@.service b/units/modprobe@.service index 5dca2cb771..34a0557735 100644 --- a/units/modprobe@.service +++ b/units/modprobe@.service @@ -13,6 +13,7 @@ DefaultDependencies=no Before=sysinit.target Documentation=man:modprobe(8) ConditionCapability=CAP_SYS_MODULE +ConditionPathExists=!/sys/module/%I [Service] Type=oneshot -- cgit v1.2.1