Blame SOURCES/Use-correct-syntax-for-passing-DEVLINKS-to-mdadm-fro.patch

b7f731
From ceb5f8ef92c97d1f44c75a3b74f64aa12a3303ef Mon Sep 17 00:00:00 2001
b7f731
From: NeilBrown <neilb@suse.com>
b7f731
Date: Fri, 4 Aug 2017 15:30:02 +1000
b7f731
Subject: [RHEL7.5 PATCH 165/169] Use correct syntax for passing DEVLINKS
b7f731
 to mdadm from udev
b7f731
b7f731
 ${DEVLINKS}
b7f731
is not valid udev syntax, and is passed through uninterpreted.
b7f731
 $env{DEVLINKS}
b7f731
or
b7f731
  %e{DEVLINKS}
b7f731
is correct.
b7f731
b7f731
Signed-off-by: NeilBrown <neilb@suse.com>
b7f731
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
b7f731
---
b7f731
 mdadm.8.in                  | 2 +-
b7f731
 udev-md-raid-assembly.rules | 2 +-
b7f731
 2 files changed, 2 insertions(+), 2 deletions(-)
b7f731
b7f731
diff --git a/mdadm.8.in b/mdadm.8.in
b7f731
index 461c5de..e0747fb 100644
b7f731
--- a/mdadm.8.in
b7f731
+++ b/mdadm.8.in
b7f731
@@ -2947,7 +2947,7 @@ This is the only context where the aliases are used.  They are
b7f731
 usually provided by a
b7f731
 .I udev
b7f731
 rules mentioning
b7f731
-.BR ${DEVLINKS} .
b7f731
+.BR $env{DEVLINKS} .
b7f731
 
b7f731
 .IP +
b7f731
 Does the device have a valid md superblock?  If a specific metadata
b7f731
diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
b7f731
index 8ca232a..9f055ed 100644
b7f731
--- a/udev-md-raid-assembly.rules
b7f731
+++ b/udev-md-raid-assembly.rules
b7f731
@@ -30,7 +30,7 @@ LABEL="md_inc"
b7f731
 
b7f731
 # remember you can limit what gets auto/incrementally assembled by
b7f731
 # mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
b7f731
-ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot ${DEVLINKS}"
b7f731
+ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}"
b7f731
 ACTION=="add|change", ENV{MD_STARTED}=="*unsafe*", ENV{MD_FOREIGN}=="no", ENV{SYSTEMD_WANTS}+="mdadm-last-resort@$env{MD_DEVICE}.timer"
b7f731
 ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="BINDIR/mdadm -If $name --path $env{ID_PATH}"
b7f731
 ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="BINDIR/mdadm -If $name"
b7f731
-- 
b7f731
2.7.4
b7f731