From 4136ec05327471a986b8d4dfada5733c6927d79e Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 24 Sep 2012 10:22:19 -0400 Subject: 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 --- mkinitcpio | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mkinitcpio b/mkinitcpio index 7c9a48a..f92cc44 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -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) -- cgit v1.2.3-24-g4f1b