Skip to contentSkip to conversation

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

PATCH In review Andrey Borzenkov 2 participants 2 messages May 9, 2010

lore
Share & tools
lore
#0 lore raw

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

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.

---

 modules.d/90kernel-modules/install |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)
modules.d/90kernel-modules/install +21 -1
index 2f19d0c..33438d5 100755
@@ -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"
#1 lore raw
Quoted 5 lines · Andrey Borzenkov

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.

Module-init-tools plans to require that, for now it just prints an error for conf files without this suffix, that states that this will no longer work in a future version. Distros should better fix all these files instead.

Kay