]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dmraid: only scan once because of one device
authorHarald Hoyer <harald@redhat.com>
Tue, 18 Aug 2015 13:04:31 +0000 (15:04 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 11 Nov 2015 15:15:22 +0000 (16:15 +0100)
(cherry picked from commit 80153acc0f8bbb3829575201e2a0ba3da41268a8)

modules.d/90dmraid/61-dmraid-imsm.rules
modules.d/90dmraid/dmraid.sh

index 33e060be469d8aaf906fe59cdb4f548ef8a650bf..de7e97e58245ffa0b71b3bc436d7b90a8b54d202 100644 (file)
@@ -24,6 +24,6 @@ PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] &&
 ENV{DEVTYPE}!="partition", \
     RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
 
-RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan"
+RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan $env{DEVNAME}"
 
 LABEL="dm_end"
index 3dcff38a43086614a48f2217f9587101c1a3c68f..e7a09b072a1baea228ffe9dadf7765356a6c2b29 100755 (executable)
@@ -2,6 +2,13 @@
 
 type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
 
+dev="$1"
+devenc=$(str_replace "$1" '/' '\2f')
+
+[ -e /tmp/dmraid.$devenc ] && exit 0
+
+>/tmp/dmraid.$devenc
+
 DM_RAIDS=$(getargs rd.dm.uuid -d rd_DM_UUID=)
 
 if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then