From 29e62278a7379336e5972df5bad751c973872039 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 17 Jun 2013 11:02:45 +0200 Subject: arch-nspawn: remove leading - from the machine name/hostname Signed-off-by: Florian Pritz Signed-off-by: Pierre Schmitz --- arch-nspawn.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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[@]}" \ "$@" -- cgit v1.2.3-70-g09d2