diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-09-24 16:22:19 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-09-30 00:06:09 +0200 |
commit | 4136ec05327471a986b8d4dfada5733c6927d79e (patch) | |
tree | 4e88509c73bdc392cf334630ceb398b1b7b44d00 | |
parent | cf4188d69685161a8a676bba25db5d6a92e9f3ab (diff) | |
download | mkinitcpio-4136ec05327471a986b8d4dfada5733c6927d79e.tar.gz mkinitcpio-4136ec05327471a986b8d4dfada5733c6927d79e.tar.xz |
mkinitcpio: munge modules.order before calling depmod
The initramfs installs all modules to kernel/ which devalues the
modules.order file. To avoid any edge cases with the wrong module being
loaded (because all matching modules for a given alias will be added),
make sure that the modules.order file is actually valid.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-x | mkinitcpio | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -371,7 +371,13 @@ if (( ${#MODPATHS[*]} )); then msg "Generating module dependencies" install -m644 -t "$BUILDROOT/usr/lib/modules/$KERNELVERSION" \ - "$MODULEDIR"/modules.{builtin,order} + "$MODULEDIR"/modules.builtin + + # we install all modules into kernel/, making the .order file incorrect + # for the module tree. munge it, so that we have an accurate index. + awk -F'/' '{ print "kernel/" $NF }' \ + "$MODULEDIR"/modules.order >"$BUILDROOT/lib/modules/$KERNELVERSION/modules.order" + depmod -b "$BUILDROOT" "$KERNELVERSION" # remove all non-binary module.* files (except devname for on-demand module loading) |