summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-05-18 06:46:54 +0200
committerAaron Griffin <aaron@archlinux.org>2006-05-18 06:46:54 +0200
commitd6ed1bd2c374be72644fdcbcecc50b164e004ade (patch)
tree870c01c1cae356c3c6ba358d8c364b2fc69abb05
parente762c20c332a3883db516dd01d31ffbd75de2ca9 (diff)
downloadmkinitcpio-d6ed1bd2c374be72644fdcbcecc50b164e004ade.tar.gz
mkinitcpio-d6ed1bd2c374be72644fdcbcecc50b164e004ade.tar.xz
Changes to basedir/depmod handling (again)
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@104 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r--mkinitcpio17
1 files changed, 10 insertions, 7 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 45b6b1a..a862999 100644
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -138,12 +138,15 @@ done
if [ "${HAS_MODULES}" == "y" ]; then
echo ":: Generating module dependancies"
- [ -e /tmp/lib/modules/${KERNELVERSION}/ ] && rm -r /tmp/lib/modules/${KERNELVERSION}/
- cp -r --parents $(grep "file /lib/modules" ${FILELIST} | awk '{print $2}') /tmp/
- depmod -b /tmp ${KERNELVERSION}
- add_file /tmp/lib/modules/${KERNELVERSION}/modules.dep ${MODULEDIR}/modules.dep
- add_file /tmp/lib/modules/${KERNELVERSION}/modules.alias ${MODULEDIR}/modules.alias
- add_file /tmp/lib/modules/${KERNELVERSION}/modules.symbols ${MODULEDIR}/modules.symbols
+ for mod in $(grep "file.*/lib/modules/${KERNELVERSION}" ${FILELIST} | cut -d' ' -f2); do
+ echo "wtf: $mod"
+ mkdir -p "$(dirname "${mod}")"
+ cp --parents "${mod}" /tmp
+ done
+ depmod -b "/tmp/${BASEDIR}" ${KERNELVERSION}
+ add_file /tmp/${MODULEDIR}/modules.dep ${MODULEDIR}/modules.dep
+ add_file /tmp/${MODULEDIR}/modules.alias ${MODULEDIR}/modules.alias
+ add_file /tmp/${MODULEDIR}/modules.symbols ${MODULEDIR}/modules.symbols
fi
if [ "x$GENIMG" != "x" ]; then
@@ -161,5 +164,5 @@ else
echo ":: Dry run complete, use -g IMAGE to generate a real image"
fi
[ -e "${MODULE_FILE}" ] && rm "${MODULE_FILE}"
-[ -e "/tmp${MODULEDIR}/" ] && rm -rf /tmp${MODULEDIR}/
+[ -e "/tmp/${MODULEDIR}/" ] && rm -rf /tmp/${MODULEDIR}/
#vim:set ft=sh ts=4 sw=4 noet: