summaryrefslogtreecommitdiffstats
path: root/units/modprobe@.service
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-05 07:20:49 +0100
committerChris Down <chris@chrisdown.name>2020-03-05 19:43:50 +0100
commit9cbf1e58f9629af5c6b56777ee73dc6320306d6d (patch)
tree30e26ff5099f29d11f6ec7668c179ab45bedc206 /units/modprobe@.service
parenttreewide: more portable bash shebangs (diff)
downloadsystemd-9cbf1e58f9629af5c6b56777ee73dc6320306d6d.tar.xz
systemd-9cbf1e58f9629af5c6b56777ee73dc6320306d6d.zip
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.
Diffstat (limited to 'units/modprobe@.service')
-rw-r--r--units/modprobe@.service1
1 files changed, 1 insertions, 0 deletions
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