2014-09-11 15:47:15 +02:00
|
|
|
From 75faba5ea84fe53df7d3ca3e4f4b6cf390c824bb Mon Sep 17 00:00:00 2001
|
2016-02-01 11:33:31 +01:00
|
|
|
From: Jan Loeser <jloeser@suse.de>
|
2014-09-11 15:47:15 +02:00
|
|
|
Date: Thu, 11 Sep 2014 15:20:23 +0200
|
|
|
|
Subject: Add SUSE kernel module dependencies (in /etc/modprobe.d/*)
|
|
|
|
|
|
|
|
bnc#895331
|
|
|
|
|
2016-02-01 11:33:31 +01:00
|
|
|
Fixed-by: Fabian Vogt <fvogt@suse.com>
|
2014-09-11 15:47:15 +02:00
|
|
|
---
|
2015-11-26 12:35:04 +01:00
|
|
|
dracut-init.sh | 6 +++++-
|
2014-09-11 15:47:15 +02:00
|
|
|
dracut.sh | 12 ++++++++++++
|
|
|
|
2 files changed, 17 insertions(+), 1 deletions(-)
|
|
|
|
|
2015-11-26 12:35:04 +01:00
|
|
|
Index: dracut-044/dracut-init.sh
|
2015-03-31 16:12:12 +02:00
|
|
|
===================================================================
|
2015-11-26 12:35:04 +01:00
|
|
|
--- dracut-044.orig/dracut-init.sh
|
|
|
|
+++ dracut-044/dracut-init.sh
|
2016-02-01 11:33:31 +01:00
|
|
|
@@ -944,6 +944,13 @@ for_each_kmod_dep() {
|
|
|
|
$_func ${_modpath} || exit $?
|
|
|
|
done
|
|
|
|
)
|
|
|
|
+
|
|
|
|
+ for suse_mod_dep in ${suse_mod_deps["${_kmod%.ko*}"]}; do
|
|
|
|
+ _modpath=$(modinfo -k "$kernel" -F filename "$suse_mod_dep" 2> /dev/null)
|
|
|
|
+ [ -n "$_modpath" ] || continue
|
|
|
|
+ for_each_kmod_dep "$_func" "$_modpath" "$@"
|
|
|
|
+ $_func ${_modpath} || exit $?
|
|
|
|
+ done
|
|
|
|
}
|
|
|
|
|
|
|
|
dracut_kernel_post() {
|
|
|
|
@@ -1141,8 +1148,14 @@ instmods() {
|
2014-09-11 15:47:15 +02:00
|
|
|
--set-version $kernel ${_moddirname} $_mpargs
|
|
|
|
((_ret+=$?))
|
|
|
|
else
|
|
|
|
- [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \
|
2015-03-31 16:12:12 +02:00
|
|
|
+ if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] \
|
|
|
|
+ && [ -n "${_mod%.ko*}" ]; then
|
|
|
|
echo ${_mod%.ko*} >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist"
|
|
|
|
+ for suse_mod_dep in ${suse_mod_deps["${_mod%.ko*}"]}; do
|
2014-09-11 15:47:15 +02:00
|
|
|
+ echo $suse_mod_dep >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist"
|
|
|
|
+ done
|
|
|
|
+ fi
|
2015-03-31 16:12:12 +02:00
|
|
|
+
|
2014-09-11 15:47:15 +02:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2015-11-26 12:35:04 +01:00
|
|
|
Index: dracut-044/dracut.sh
|
2015-03-31 16:12:12 +02:00
|
|
|
===================================================================
|
2015-11-26 12:35:04 +01:00
|
|
|
--- dracut-044.orig/dracut.sh
|
|
|
|
+++ dracut-044/dracut.sh
|
|
|
|
@@ -767,6 +767,18 @@ if [[ -n "$logfile" ]];then
|
2014-09-11 15:47:15 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
+# parse SUSE kernel module dependencies
|
|
|
|
+# Kernel modules using "load_module" function may not show up in modprobe
|
|
|
|
+# depencies. While this is the case there is a workaround in SUSE which adds:
|
|
|
|
+# # SUSE_INITRD: module_name REQUIRES module1 module2 ...
|
|
|
|
+# to /etc/modprobe.d/*.conf
|
|
|
|
+declare -A suse_mod_deps
|
|
|
|
+while read -r line; do
|
|
|
|
+ _suse_mod="${line##*SUSE INITRD: }"
|
|
|
|
+ _suse_mod="${_suse_mod%% REQUIRES*}"
|
|
|
|
+ suse_mod_deps["$_suse_mod"]="${suse_mod_deps["$_suse_mod"]} ${line##*REQUIRES }"
|
|
|
|
+done <<< "$(grep -h "^# SUSE INITRD: " /etc/modprobe.d/[0-9][0-9]*.conf)"
|
|
|
|
+
|
|
|
|
# handle compression options.
|
2015-11-26 12:35:04 +01:00
|
|
|
if [[ $_no_compress_l = "cat" ]]; then
|
|
|
|
compress="cat"
|