summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-09-24 14:30:22 +0200
committerDave Reisner <dreisner@archlinux.org>2012-09-24 14:30:22 +0200
commitc3d068b9ff96b2897cec6a0874ff47e595b77de4 (patch)
tree868920090bd8e0024aad8e0ed3fd51a377cde423
parent34b9a2b1509c0288a9635b8b3bdb32ca03df8270 (diff)
downloadmkinitcpio-c3d068b9ff96b2897cec6a0874ff47e595b77de4.tar.gz
mkinitcpio-c3d068b9ff96b2897cec6a0874ff47e595b77de4.tar.xz
mkinitcpio: protect module install on $MODPATHS
This was always wrong and should have been braced by MODPATHS rather than ADDED_MODULES. However, since ADDED_MODULES now possibly contains modules that weren't actually added (builtins), creating an initramfs without modules causes cp to be passed a null string to be copied. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkinitcpio b/mkinitcpio
index c80db8f..766405a 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -362,7 +362,7 @@ write_image_config
trap -- RETURN
trap '(( ++builderrors ))' ERR
-if (( ${#ADDED_MODULES[*]} )); then
+if (( ${#MODPATHS[*]} )); then
printf '%s\0' "${MODPATHS[@]}" | sort -zu |
xargs -0 cp -t "$BUILDROOT/usr/lib/modules/$KERNELVERSION/kernel"