Blame SOURCES/0311-dmraid-only-scan-once-because-of-one-device.patch

712866
From 80153acc0f8bbb3829575201e2a0ba3da41268a8 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Tue, 18 Aug 2015 15:04:31 +0200
712866
Subject: [PATCH] dmraid: only scan once because of one device
712866
712866
---
712866
 modules.d/90dmraid/61-dmraid-imsm.rules | 2 +-
712866
 modules.d/90dmraid/dmraid.sh            | 7 +++++++
712866
 2 files changed, 8 insertions(+), 1 deletion(-)
712866
712866
diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules
5c6c2a
index 33e060be..de7e97e5 100644
712866
--- a/modules.d/90dmraid/61-dmraid-imsm.rules
712866
+++ b/modules.d/90dmraid/61-dmraid-imsm.rules
712866
@@ -24,6 +24,6 @@ PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] &&
712866
 ENV{DEVTYPE}!="partition", \
712866
     RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
712866
 
712866
-RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan"
712866
+RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan $env{DEVNAME}"
712866
 
712866
 LABEL="dm_end"
712866
diff --git a/modules.d/90dmraid/dmraid.sh b/modules.d/90dmraid/dmraid.sh
5c6c2a
index 3753ddd7..ce9a6b20 100755
712866
--- a/modules.d/90dmraid/dmraid.sh
712866
+++ b/modules.d/90dmraid/dmraid.sh
712866
@@ -4,6 +4,13 @@
712866
 
712866
 type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
712866
 
712866
+dev="$1"
712866
+devenc=$(str_replace "$1" '/' '\2f')
712866
+
712866
+[ -e /tmp/dmraid.$devenc ] && exit 0
712866
+
712866
+>/tmp/dmraid.$devenc
712866
+
712866
 DM_RAIDS=$(getargs rd.dm.uuid -d rd_DM_UUID=)
712866
 
712866
 if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then