dracut/0172-dracut.sh-add-back-hos...

36 lines
943 B
Diff

From 63a44c8dc31f3168c85d9851619af2876cda4d00 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 16 Nov 2015 09:24:50 +0100
Subject: [PATCH] dracut.sh: add back host_modules part
host_modules was removed accidently while remove host_modaliases
---
dracut.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dracut.sh b/dracut.sh
index a21295d..be4c107 100755
--- 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