summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmkinitcpio5
1 files changed, 4 insertions, 1 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 0b2a573..920a537 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -323,7 +323,10 @@ trap ERR
if (( ${#ADDED_MODULES[*]} )); then
mkdir -p "${MODPATHS[@]%/*}"
- cp --parents "${MODPATHS[@]}" "$BUILDROOT"
+
+ pushd "${BASEDIR:-/}" >/dev/null
+ cp --parents "${MODPATHS[@]/#$BASEDIR/.}" "$BUILDROOT"
+ popd >/dev/null
msg "Generating module dependencies"
/sbin/depmod -b "${TMPDIR}/root" "${KERNELVERSION}"