summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-02-14 03:02:44 +0100
committerDave Reisner <dreisner@archlinux.org>2012-02-14 03:02:44 +0100
commit7e86a4dcfea86d87a29862a02b68ae37d7d1fb1e (patch)
tree66367acfc33b7ebe2f339ee8fde910f0ba7c99c5
parent09ae1b320ebde6d5f1ffc0efb2d9e1d59e8355cf (diff)
downloadmkinitcpio-7e86a4dcfea86d87a29862a02b68ae37d7d1fb1e.tar.gz
mkinitcpio-7e86a4dcfea86d87a29862a02b68ae37d7d1fb1e.tar.xz
mkinitcpio: install all modules to a single dir
depmod doesn't care where modules are, within reason, and separating modules into the respective hierarchies only serves to irritate users who go looking for modules in the rootfs (aka me). Forget all this and dump everything into the kernel/ dir. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio8
1 files changed, 2 insertions, 6 deletions
diff --git a/mkinitcpio b/mkinitcpio
index a865770..f79fbcb 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -200,7 +200,7 @@ workdir=$(TMPDIR=$TMPDIR mktemp -d --tmpdir mkinitcpio.XXXXXX)
BUILDROOT=$workdir/root
# explicitly create the buildroot
-mkdir "$BUILDROOT"
+mkdir -p "$BUILDROOT/lib/modules/$KERNELVERSION/kernel"
# use preset $PRESET
if [[ $PRESET ]]; then
@@ -339,11 +339,7 @@ parse_hook
trap '(( ++builderrors ))' ERR
if (( ${#ADDED_MODULES[*]} )); then
- mkdir -p "${MODPATHS[@]%/*}"
-
- pushd "${BASEDIR:-/}" >/dev/null
- cp --parents "${MODPATHS[@]/#$BASEDIR/.}" "$BUILDROOT"
- popd >/dev/null
+ cp "${MODPATHS[@]}" "$BUILDROOT/lib/modules/$KERNELVERSION/kernel"
msg "Generating module dependencies"
install -m644 -t "$BUILDROOT/lib/modules/$KERNELVERSION" \