From 64fcb3cce7a1b549af872297982545485c269232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= Date: Fri, 22 Apr 2011 17:43:11 +0200 Subject: [PATCH] kernel-modules: inst modules.builtin if there's no modules.builtin.bin Also report failure if none of them exist. --- modules.d/90kernel-modules/module-setup.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh index 5f0e4a75c5..5764bf5051 100755 --- a/modules.d/90kernel-modules/module-setup.sh +++ b/modules.d/90kernel-modules/module-setup.sh @@ -46,5 +46,14 @@ install() { dracut_install $(find /etc/modprobe.d/ -type f -name '*.conf') inst_hook cmdline 01 "$moddir/parse-kernel.sh" inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh - inst "$srcmods/modules.builtin.bin" "/lib/modules/$kernel/modules.builtin.bin" + + local f + + for f in modules.builtin.bin modules.builtin; do + [[ $srcmods/$f ]] && inst "$srcmods/$f" "/lib/modules/$kernel/$f" \ + && break + done || { + dfatal "No modules.builtin.bin and modules.builtin found!" + return 1 + } }