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:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-08-16 01:57:39 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-08-16 01:57:39 -0400
commitfabc14e262414debb6bbd562e6a6a37afa2cce79 (patch)
treec569d6edad57db9692fec72383ccbb5687b1d76d /arch-nspawn.in
parent06e3de14a9d82b456176c1966919e0bbd457da69 (diff)
parent8dbb02de4f50aeb05c5df2ef8d9c8cf394b4f9ac (diff)
Merge remote-tracking branch 'remotes/devtools/master'
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[@]}" \
"$@"