d/extra/rules/73-special-net-names.rules: use $$ instead of $ in PROGRAM= value
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 d7aee41d, 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.
Loading
Please register or sign in to comment