Skip to content
Commit 8797c079 authored by Dan Streetman's avatar Dan Streetman Committed by Martin Pitt
Browse files

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.
parent 1aa38859
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment