summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-06-17 11:02:45 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-08 21:24:55 +0200
commit29e62278a7379336e5972df5bad751c973872039 (patch)
tree313e63f6bed2114b26faa5f888d019327583d933
parent8c4553f68cb1c01b24f4883db0032f646b2e77dd (diff)
downloaddevtools32-29e62278a7379336e5972df5bad751c973872039.tar.xz
arch-nspawn: remove leading - from the machine name/hostname
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
-rw-r--r--arch-nspawn.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index 8ef39ed..441b502 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -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[@]}" \
"$@"