summaryrefslogtreecommitdiffstats
path: root/arch-nspawn.in
diff options
context:
space:
mode:
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r--arch-nspawn.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index fdff31e..b3dfbfb 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -96,4 +96,10 @@ fi
build_mount_args
copy_hostconf
-exec systemd-nspawn -D "$working_dir" --machine "${working_dir//\//-}" "${mount_args[@]}" "$@"
+eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf")
+
+exec ${CARCH:+setarch "$CARCH"} systemd-nspawn \
+ -D "$working_dir" \
+ --machine "${working_dir//\//-}" \
+ "${mount_args[@]}" \
+ "$@"