Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/arch-nspawn.in
diff options
context:
space:
mode:
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r--arch-nspawn.in9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index 8ef39ed..a05ca1c 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -88,9 +88,9 @@ umask 0022
# Sanity check
if [[ ! -f "$working_dir/.arch-chroot" ]]; then
- die "'$working_dir' does not appear to be a Arch chroot."
+ die "'%s' does not appear to be a Arch chroot." "$working_dir"
elif [[ $(cat "$working_dir/.arch-chroot") != $CHROOT_VERSION ]]; then
- die "chroot '$working_dir' is not at version $CHROOT_VERSION. Please rebuild."
+ die "chroot '%s' is not at version %s. Please rebuild." "$working_dir" "$CHROOT_VERSION"
fi
build_mount_args
@@ -98,8 +98,11 @@ copy_hostconf
eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf")
+machine_name="${working_dir//\//-}"
+machine_name="${machine_name#-}"
+
exec ${CARCH:+setarch "$CARCH"} systemd-nspawn 2>/dev/null \
-D "$working_dir" \
- --machine "${working_dir//\//-}" \
+ --machine "$machine_name" \
"${mount_args[@]}" \
"$@"