Blame SOURCES/0003-dracut.sh-also-search-uevent-s-for-MODALIAS.patch

712866
From af34b260474c551a45a6fa4ae8719622f1e35910 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Fri, 13 Sep 2013 17:34:18 +0200
712866
Subject: [PATCH] dracut.sh: also search uevent's for MODALIAS
712866
712866
---
712866
 dracut.sh | 8 ++++++++
712866
 1 file changed, 8 insertions(+)
712866
712866
diff --git a/dracut.sh b/dracut.sh
5c6c2a
index fd278466..ce39151c 100755
712866
--- a/dracut.sh
712866
+++ b/dracut.sh
712866
@@ -923,6 +923,14 @@ if [[ $hostonly ]]; then
712866
     while read m; do
712866
         modalias="$(<"$m")" && [[ $modalias ]] && host_modalias["$modalias"]=1
712866
     done < "$initdir/.modalias"
712866
+    find  /sys/devices/ -name uevent -print > "$initdir/.modalias"
712866
+    while read m; do
712866
+        while read line; do
712866
+            [[ "$line" != MODALIAS\=* ]] && continue
712866
+            modalias="${line##MODALIAS=}" && [[ $modalias ]] && host_modalias["$modalias"]=1
712866
+        done < "$m"
712866
+    done < "$initdir/.modalias"
712866
+
712866
     rm -f -- "$initdir/.modalias"
712866
 
712866
     # check /proc/modules