dracut/0019-dracut-functions.sh-for_each_module_dir-skip-empty-m.patch
Harald Hoyer fe48c9c4e5 dracut-032-23.git20130904
- fixed curl error with zero size kickstart file
Resolves: rhbz#989133
- fixed systemd-cat failure, when systemd is installed
  but not actually running
Resolves: rhbz#1002021
- do not fail on empty dracut module directories
Resolves: rhbz#1003153
2013-09-04 13:43:12 +02:00

27 lines
943 B
Diff

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