]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
kernel-modules/module-setup.sh: fix modprobe.d install
authorHarald Hoyer <harald@redhat.com>
Mon, 23 Jul 2012 09:38:36 +0000 (11:38 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 23 Jul 2012 09:38:36 +0000 (11:38 +0200)
if /lib/modprobe.d does not exist, it errors with:
find: `/lib/modprobe.d/': No such file or directory

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

index f309de8b1a21b3a0931749a24c3c3a2f25bf3c95..5391ed79a26d8a90dee70dee62224cdd287ea329 100755 (executable)
@@ -77,7 +77,10 @@ installkernel() {
 install() {
     local _f i
     [ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
-    dracut_install $(find -L /{etc,lib}/modprobe.d/ -maxdepth 1 -type f -name '*.conf')
+    set -- /{etc,lib}/modprobe.d/*.conf
+    if [[ -f $1 ]]; then
+        dracut_install "$@"
+    fi
     inst_hook cmdline 01 "$moddir/parse-kernel.sh"
     inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
 }