]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(kernel-modules): optionally add /usr/lib/modules.d to initramfs
authorDaniel Molkentin <dmolkentin@suse.com>
Mon, 1 Mar 2021 15:44:56 +0000 (16:44 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Wed, 3 Mar 2021 10:42:09 +0000 (11:42 +0100)
On SUSE, there is no /lib/modules.d, only /usr/lib/modules.d.

Upstream-Bug: http://bugzilla.opensuse.org/show_bug.cgi?id=1180822

Reference: bsc#1180822

modules.d/90kernel-modules/module-setup.sh

index bd8e97b50c8609bd5f1ede49c90272332c1f255b..7703d4632966e80448f3a46d58e12a4f13d9fece 100755 (executable)
@@ -141,7 +141,8 @@ installkernel() {
 
 # called by dracut
 install() {
-    inst_multiple -o "/lib/modprobe.d/*.conf"
+    [[ -d /lib/modprobe.d ]] && inst_multiple -o "/lib/modprobe.d/*.conf"
+    [[ -d /usr/lib/modprobe.d ]] && inst_multiple -o "/usr/lib/modprobe.d/*.conf"
     [[ $hostonly ]] && inst_multiple -H -o /etc/modprobe.d/*.conf /etc/modprobe.conf
     if ! dracut_module_included "systemd"; then
         inst_hook cmdline 01 "$moddir/parse-kernel.sh"