dracut/0019-dracut-functions.sh-for_each_module_dir-skip-empty-m.patch

27 lines
943 B
Diff
Raw Normal View History

From 00ed3ccfd910c84d5236f899ccf4fd45fc714197 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 2 Sep 2013 10:27:46 +0200
Subject: [PATCH] dracut-functions.sh:for_each_module_dir() skip empty modules
skip modules, which have no module-setup.sh, install or installkernel
https://bugzilla.redhat.com/show_bug.cgi?id=1003153
---
dracut-functions.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 4c62d6b..1d39a6d 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -1302,6 +1302,9 @@ for_each_module_dir() {
local _func
_func=$1
for _moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
+ [[ -d $_moddir ]] || continue;
+ [[ -e $_moddir/install || -e $_moddir/installkernel || \
+ -e $_moddir/module-setup.sh ]] || continue
_mod=${_moddir##*/}; _mod=${_mod#[0-9][0-9]}
$_func $_mod 1
done