summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-09-30 19:48:03 +0200
committerDave Reisner <dreisner@archlinux.org>2012-10-07 02:38:02 +0200
commit321fa7f59c8b16e6be34bc76732dffc522dd9445 (patch)
tree68b31c43b9bc30273b1db9974fbd60073b46ef42
parent903e79f5741b70fc5c0166a4b0a9b4f54768cd89 (diff)
downloadmkinitcpio-321fa7f59c8b16e6be34bc76732dffc522dd9445.tar.gz
mkinitcpio-321fa7f59c8b16e6be34bc76732dffc522dd9445.tar.xz
ensure builtins are dash/underscore translated
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio6
1 files changed, 4 insertions, 2 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 76acc33..5baf5d2 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -407,9 +407,11 @@ trap '(( $? )) && [[ $FUNCNAME = add_* ]] && (( ++_builderrors ))' RETURN
# prime the _addedmodules list with the builtins for this kernel
if [[ -r $_d_kmoduledir/modules.builtin ]]; then
- while read -a path; do
- _addedmodules["${path[-1]%.ko}"]=2
+ while IFS=/ read -a path; do
+ modname=${path[-1]%.ko}
+ _addedmodules["${modname//-/_}"]=2
done <"$_d_kmoduledir/modules.builtin"
+ unset modname path
fi
for hook in "${_hooks[@]}"; do