Blame 0172-dracut.sh-add-back-host_modules-part.patch

Harald Hoyer 7e8da8
From 63a44c8dc31f3168c85d9851619af2876cda4d00 Mon Sep 17 00:00:00 2001
Harald Hoyer 7e8da8
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 7e8da8
Date: Mon, 16 Nov 2015 09:24:50 +0100
Harald Hoyer 7e8da8
Subject: [PATCH] dracut.sh: add back host_modules part
Harald Hoyer 7e8da8
Harald Hoyer 7e8da8
host_modules was removed accidently while remove host_modaliases
Harald Hoyer 7e8da8
---
Harald Hoyer 7e8da8
 dracut.sh | 7 +++++++
Harald Hoyer 7e8da8
 1 file changed, 7 insertions(+)
Harald Hoyer 7e8da8
Harald Hoyer 7e8da8
diff --git a/dracut.sh b/dracut.sh
Harald Hoyer 7e8da8
index a21295d..be4c107 100755
Harald Hoyer 7e8da8
--- a/dracut.sh
Harald Hoyer 7e8da8
+++ b/dracut.sh
Harald Hoyer 7e8da8
@@ -1100,6 +1100,8 @@ if (( ${#add_device_l[@]} )); then
Harald Hoyer 7e8da8
     push_host_devs "${add_device_l[@]}"
Harald Hoyer 7e8da8
 fi
Harald Hoyer 7e8da8
 
Harald Hoyer 7e8da8
+declare -A host_modules
Harald Hoyer 7e8da8
+
Harald Hoyer 7e8da8
 if [[ $hostonly ]]; then
Harald Hoyer 7e8da8
     # in hostonly mode, determine all devices, which have to be accessed
Harald Hoyer 7e8da8
     # and examine them for filesystem types
Harald Hoyer 7e8da8
@@ -1187,6 +1189,11 @@ if [[ $hostonly ]]; then
Harald Hoyer 7e8da8
             fi
Harald Hoyer 7e8da8
         done < /etc/fstab
Harald Hoyer 7e8da8
     fi
Harald Hoyer 7e8da8
+
Harald Hoyer 7e8da8
+    # check /proc/modules
Harald Hoyer 7e8da8
+    while read m rest || [ -n "$m" ]; do
Harald Hoyer 7e8da8
+        host_modules["$m"]=1
Harald Hoyer 7e8da8
+    done 
Harald Hoyer 7e8da8
 fi
Harald Hoyer 7e8da8
 
Harald Hoyer 7e8da8
 unset m