]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Use correct syntax for passing DEVLINKS to mdadm from udev
authorNeilBrown <neilb@suse.com>
Fri, 4 Aug 2017 05:30:02 +0000 (15:30 +1000)
committerJes Sorensen <jsorensen@fb.com>
Wed, 16 Aug 2017 12:25:07 +0000 (08:25 -0400)
 ${DEVLINKS}
is not valid udev syntax, and is passed through uninterpreted.
 $env{DEVLINKS}
or
  %e{DEVLINKS}
is correct.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
mdadm.8.in
udev-md-raid-assembly.rules

index 461c5de103cc94fa5eddb44be3cc38ea2193e38b..e0747fb804eadf83c36dd8bae1fdf07cf4a230e2 100644 (file)
@@ -2947,7 +2947,7 @@ This is the only context where the aliases are used.  They are
 usually provided by a
 .I udev
 rules mentioning
-.BR ${DEVLINKS} .
+.BR $env{DEVLINKS} .
 
 .IP +
 Does the device have a valid md superblock?  If a specific metadata
index 8ca232a44b1f2a55db6687fce46df212ab485f3e..9f055ed022d531371ebbe12d52a601214fdf5b8a 100644 (file)
@@ -30,7 +30,7 @@ LABEL="md_inc"
 
 # remember you can limit what gets auto/incrementally assembled by
 # mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
-ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot ${DEVLINKS}"
+ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}"
 ACTION=="add|change", ENV{MD_STARTED}=="*unsafe*", ENV{MD_FOREIGN}=="no", ENV{SYSTEMD_WANTS}+="mdadm-last-resort@$env{MD_DEVICE}.timer"
 ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="BINDIR/mdadm -If $name --path $env{ID_PATH}"
 ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="BINDIR/mdadm -If $name"