Blame 0006-kernel-modules-module-setup.sh-fix-modprobe.d-instal.patch

Harald Hoyer 12f6cc
From b7c8f59fef3a2a36726f5ea988b74ba6bf1da695 Mon Sep 17 00:00:00 2001
Harald Hoyer 12f6cc
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 12f6cc
Date: Mon, 23 Jul 2012 11:38:36 +0200
Harald Hoyer 12f6cc
Subject: [PATCH] kernel-modules/module-setup.sh: fix modprobe.d install
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
if /lib/modprobe.d does not exist, it errors with:
Harald Hoyer 12f6cc
find: `/lib/modprobe.d/': No such file or directory
Harald Hoyer 12f6cc
---
Harald Hoyer 12f6cc
 modules.d/90kernel-modules/module-setup.sh | 5 ++++-
Harald Hoyer 12f6cc
 1 file changed, 4 insertions(+), 1 deletion(-)
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
Harald Hoyer 12f6cc
index f309de8..5391ed7 100755
Harald Hoyer 12f6cc
--- a/modules.d/90kernel-modules/module-setup.sh
Harald Hoyer 12f6cc
+++ b/modules.d/90kernel-modules/module-setup.sh
Harald Hoyer 12f6cc
@@ -77,7 +77,10 @@ installkernel() {
Harald Hoyer 12f6cc
 install() {
Harald Hoyer 12f6cc
     local _f i
Harald Hoyer 12f6cc
     [ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
Harald Hoyer 12f6cc
-    dracut_install $(find -L /{etc,lib}/modprobe.d/ -maxdepth 1 -type f -name '*.conf')
Harald Hoyer 12f6cc
+    set -- /{etc,lib}/modprobe.d/*.conf
Harald Hoyer 12f6cc
+    if [[ -f $1 ]]; then
Harald Hoyer 12f6cc
+        dracut_install "$@"
Harald Hoyer 12f6cc
+    fi
Harald Hoyer 12f6cc
     inst_hook cmdline 01 "$moddir/parse-kernel.sh"
Harald Hoyer 12f6cc
     inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
Harald Hoyer 12f6cc
 }