From 6fbdc4eb481302541cf8fa282fb3453e4c5d0d16 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 11 Sep 2013 13:58:11 -0400 Subject: arch-nspawn: set machine_name in a safer/different way, don't hide errors --- arch-nspawn.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch-nspawn.in') diff --git a/arch-nspawn.in b/arch-nspawn.in index 66a0f37..ec9b2d3 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -98,10 +98,10 @@ copy_hostconf eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf") -machine_name="${working_dir//\//-}" -machine_name="${machine_name#-}" +machine_name="${working_dir##*/}" +machine_name="${machine_name//\./-}" -exec ${CARCH:+setarch "$CARCH"} systemd-nspawn 2>/dev/null \ +exec ${CARCH:+setarch "$CARCH"} systemd-nspawn \ -D "$working_dir" \ --machine "$machine_name" \ "${mount_args[@]}" \ -- cgit v1.2.3-70-g09d2