]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: modprobe@.service: don't unescape instance name
authorMartin Wilck <mwilck@suse.com>
Fri, 20 Oct 2023 14:25:15 +0000 (16:25 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 21 Oct 2023 10:41:22 +0000 (11:41 +0100)
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.

units/modprobe@.service

index 85a2c08dee63bfac439f1e3ff286a8c5bd504ed7..fe631fffeb8cd7a3439867578f7818acf211e1fb 100644 (file)
@@ -17,4 +17,4 @@ StartLimitIntervalSec=0
 
 [Service]
 Type=oneshot
-ExecStart=-/sbin/modprobe -abq %I
+ExecStart=-/sbin/modprobe -abq %i