[PATCH] Do not require .conf suffix for files in /etc/modprobe.d

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently dracut will install only modprobe configuration files
matching *.conf. module-init-tools itself does not have this restriction
and uses blacklist for known pre-/suffixes instead. Some distributions
(e.g. Mandriva) widely use files without .conf suffix. Let dracut
accept the same set of files as module-init-tools will.

Signed-off-by: Andrey Borzenkov <arvidjaar@xxxxxxx>

---

 modules.d/90kernel-modules/install |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/modules.d/90kernel-modules/install b/modules.d/90kernel-modules/install
index 2f19d0c..33438d5 100755
--- a/modules.d/90kernel-modules/install
+++ b/modules.d/90kernel-modules/install
@@ -1,4 +1,24 @@
 #!/bin/bash
 [ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
-dracut_install $(find /etc/modprobe.d/ -type f -name '*.conf')
+
+# This matches blacklist used by module-init-tools
+dracut_install $(find /etc/modprobe.d/ \
+	-name '.*' -o \
+	-name '~*' -o \
+	-name '*.rpmsave' -o \
+	-name '*.rpmorig' -o \
+	-name '*.rpmnew' -o \
+	-name '*.dpkg-old' -o \
+	-name '*.dpkg-dist' -o \
+	-name '*.dpkg-new' -o \
+	-name '*.dpkg-bak' -o \
+	-name '*.bak' -o \
+	-name '*.orig' -o \
+	-name '*.rej' -o \
+	-name '*.YaST2save' -o \
+	-name '*.-' -o \
+	-name '*~' -o \
+	-name '*,v' -o \
+	-type f -print)
+
 inst_hook cmdline 01 "$moddir/parse-kernel.sh"

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux