mirror of
https://git.proxmox.com/git/systemd
synced 2026-01-21 19:13:45 +00:00
The use of the '$' character in PROGRAM="" values is supposed to be doubled
if it is intended for use by the program being run, instead of as a
substitution variable for udev to replace before running the program; i.e.
it should be '$$' if udev should pass a single '$' in its place to the
program command line.
However, if the variable it precedes isn't a valid substitution variable
name, it is left in place for the program to evaluate. So, while not
correct per the 'man udev' documentation, this udev rule's use of single
'$' characters has (and still currently does) work correctly.
However, since commit d7aee41db35f808bca92d4910bf6e52cec3f8e59, un-doubled
use of '$' characters like this has resulted in a warning message being printed:
[ 17.560125] systemd-udevd[132]: /lib/udev/rules.d/73-special-net-names.rules:14 Invalid value "/bin/sh -ec 'D=${DEVPATH#*/vio/}; D=${D%%%%/*}; D=${D#????}; D=${D#0}; D=${D#0}; D=${D#0}; D=${D#0}; echo ${D:-0}'" for PROGRAM (char 16: invalid substitution type), ignoring, but please fix it.
This corrects the rule to use $$ instead.
Also, just to note, the rule already correctly doubles the '%' chars
that it uses.
|
||
|---|---|---|
| .. | ||
| 50-firmware.rules | ||
| 73-special-net-names.rules | ||
| 73-usb-net-by-mac.rules | ||
| 80-debian-compat.rules | ||