1
0
mirror of https://github.com/systemd/systemd synced 2024-07-01 07:34:28 +00:00

units: modprobe@.service: don't unescape instance name

modprobe treats "-" and "_" interchangeably, thereby avoiding frequent
errors because some module names contain dashes and others underscores.

Because modprobe@.service unescapes the instance name, an attempt to
start "modprobe@dm-crypt.service" will run "modprobe -abq dm/crypt",
which is doomed to fail. "modprobe@dm_crypt.service" will work as
expected. Thus unescaping the instance name has surprising side effects.
Use "%i" instead.
This commit is contained in:
Martin Wilck 2023-10-20 16:25:15 +02:00 committed by Luca Boccassi
parent a1af99df8e
commit bf25cf6c49

View File

@ -17,4 +17,4 @@ StartLimitIntervalSec=0
[Service]
Type=oneshot
ExecStart=-/sbin/modprobe -abq %I
ExecStart=-/sbin/modprobe -abq %i