summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-09-17 16:32:44 +0200
committerDave Reisner <dreisner@archlinux.org>2012-09-17 16:49:44 +0200
commit2b227f8ac09c2767e621db5919e9da5d99e09b31 (patch)
treee7f481850e83db6ff92ee8188edad4e7459c9ab9
parentb8d9c5cd2753e924150f7d3b9081a5e1c2cafad2 (diff)
downloadmkinitcpio-2b227f8ac09c2767e621db5919e9da5d99e09b31.tar.gz
mkinitcpio-2b227f8ac09c2767e621db5919e9da5d99e09b31.tar.xz
silently ignore builtin modules
Assuming modules.builtin exists, add the module names it contains to the ADDED_MODULES hash so that we silently skip over them. Suggested-by: Matthew Monaco <dgbaley27@0x01b.net> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio7
1 files changed, 7 insertions, 0 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 5ea02dd..bdeaa74 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -343,6 +343,13 @@ declare -i builderrors=0
set -o functrace
trap '(( $? )) && [[ $FUNCNAME = add_* ]] && (( ++builderrors ))' RETURN
+# prime the ADDED_MODULES list with the builtins for this kernel
+if [[ -r $MODULEDIR/modules.builtin ]]; then
+ while read -a path; do
+ ADDED_MODULES["${path[-1]%.ko}"]=1
+ done <"$MODULEDIR/modules.builtin"
+fi
+
for hook in "${hooks[@]}"; do
run_build_hook "$hook" || (( ++builderrors ))
done