]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.sh: add back host_modules part
authorHarald Hoyer <harald@redhat.com>
Mon, 16 Nov 2015 08:24:50 +0000 (09:24 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 16 Nov 2015 08:26:51 +0000 (09:26 +0100)
host_modules was removed accidently while remove host_modaliases

dracut.sh

index a21295d85e5429b4697c6829d0c0bac43e2c752c..be4c1073f97c4b68b07d0c3f4711b4b1a5b9c8a2 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1100,6 +1100,8 @@ if (( ${#add_device_l[@]} )); then
     push_host_devs "${add_device_l[@]}"
 fi
 
+declare -A host_modules
+
 if [[ $hostonly ]]; then
     # in hostonly mode, determine all devices, which have to be accessed
     # and examine them for filesystem types
@@ -1187,6 +1189,11 @@ if [[ $hostonly ]]; then
             fi
         done < /etc/fstab
     fi
+
+    # check /proc/modules
+    while read m rest || [ -n "$m" ]; do
+        host_modules["$m"]=1
+    done </proc/modules
 fi
 
 unset m