From 0f53f8ead0e5f22744882b5452db1664716d466c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 31 Jan 2011 18:35:30 -0600 Subject: 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 --- mkinitcpio | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mkinitcpio') 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" -- cgit v1.2.3-24-g4f1b