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

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