Skip to content

Commit

Permalink
units: [email protected]: don't unescape instance name
Browse files Browse the repository at this point in the history
modprobe treats "-" and "_" interchangeably, thereby avoiding frequent
errors because some module names contain dashes and others underscores.

Because [email protected] unescapes the instance name, an attempt to
start "[email protected]" 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.
  • Loading branch information
mwilck authored and bluca committed Oct 21, 2023
1 parent a1af99d commit bf25cf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion units/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ StartLimitIntervalSec=0

[Service]
Type=oneshot
ExecStart=-/sbin/modprobe -abq %I
ExecStart=-/sbin/modprobe -abq %i

0 comments on commit bf25cf6

Please sign in to comment.