summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-02-01 01:35:30 +0100
committerThomas Bächler <thomas@archlinux.org>2011-02-01 01:37:15 +0100
commit0f53f8ead0e5f22744882b5452db1664716d466c (patch)
tree33ca2976b35db04e31e727079f0ae3422cfd1c86 /mkinitcpio
parentb5fa5b45283afb697c327fcebaabf0501eeb2920 (diff)
downloadmkinitcpio-0f53f8ead0e5f22744882b5452db1664716d466c.tar.gz
mkinitcpio-0f53f8ead0e5f22744882b5452db1664716d466c.tar.xz
Use install instead of mkdir/cp
Saves a process invocation per kernel module. Based on work presented in FS#18347, and fixed to ensure we are using the install utility rather than our defined function. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-xmkinitcpio6
1 files changed, 3 insertions, 3 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 7ce1401..c2565f5 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -263,10 +263,10 @@ done
if [ "${HAS_MODULES}" = "y" ]; then
echo ":: Generating module dependencies"
+ # unfortuate name collision between a function and utility program
+ unset install
for mod in $(grep "file /lib/modules/${KERNELVERSION}" ${FILELIST} | cut -d' ' -f2); do
- dir=$(get_dirname "${mod}")
- mkdir -p "${TMPDIR}/${dir}"
- cp "${BASEDIR}${mod}" "${TMPDIR}/${dir}/"
+ install -m 644 -D "${BASEDIR}${mod}" "${TMPDIR}${mod}"
done
/sbin/depmod -b ${TMPDIR} ${KERNELVERSION}
add_file "${TMPDIR}/lib/modules/${KERNELVERSION}/modules.dep" "/lib/modules/${KERNELVERSION}/modules.dep"