Blame SOURCES/0004-dracut.sh-we-don-t-need-to-read-the-modalias-files.patch

18971c
From 72ce014bc79933379cb864cef665114ac5d4ccfa Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Fri, 13 Sep 2013 17:51:29 +0200
18971c
Subject: [PATCH] dracut.sh: we don't need to read the modalias files
18971c
18971c
udev does only parse the uevent MODALIAS line, so whatever is in the
18971c
modalias files would not trigger any module load.
18971c
---
18971c
 dracut.sh | 5 +----
18971c
 1 file changed, 1 insertion(+), 4 deletions(-)
18971c
18971c
diff --git a/dracut.sh b/dracut.sh
18971c
index ce39151c..196b3ad4 100755
18971c
--- a/dracut.sh
18971c
+++ b/dracut.sh
18971c
@@ -919,15 +919,12 @@ if [[ $hostonly ]]; then
18971c
     fi
18971c
     # record all host modaliases
18971c
     declare -A host_modalias
18971c
-    find  /sys/devices/ -name modalias -print > "$initdir/.modalias"
18971c
-    while read m; do
18971c
-        modalias="$(<"$m")" && [[ $modalias ]] && host_modalias["$modalias"]=1
18971c
-    done < "$initdir/.modalias"
18971c
     find  /sys/devices/ -name uevent -print > "$initdir/.modalias"
18971c
     while read m; do
18971c
         while read line; do
18971c
             [[ "$line" != MODALIAS\=* ]] && continue
18971c
             modalias="${line##MODALIAS=}" && [[ $modalias ]] && host_modalias["$modalias"]=1
18971c
+            break
18971c
         done < "$m"
18971c
     done < "$initdir/.modalias"
18971c