From d83805bc54b04d8c63982784e1a220a2bd87e3b0 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 31 Aug 2014 09:43:00 -0400 Subject: nspawn: skip machine registration No need to do this since we don't run an init system in the build root. --- arch-nspawn.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'arch-nspawn.in') diff --git a/arch-nspawn.in b/arch-nspawn.in index 4436a0e..1879442 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -94,11 +94,8 @@ copy_hostconf eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf") -machine_name="${working_dir//[![:alnum:]_-]/-}" -machine_name="${machine_name#-}" - exec ${CARCH:+setarch "$CARCH"} systemd-nspawn 2>/dev/null \ -D "$working_dir" \ - --machine "$machine_name" \ + --register=no \ "${mount_args[@]}" \ "$@" -- cgit v1.2.3-2-g168b From 651f8f834ff4076ece781d276cdc60137c961081 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 10 May 2014 22:22:03 -0400 Subject: arch-nspawn: Fix a grammar mistake (a/an) in an error message. --- arch-nspawn.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch-nspawn.in') diff --git a/arch-nspawn.in b/arch-nspawn.in index 1879442..b85d360 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -84,7 +84,7 @@ umask 0022 # Sanity check if [[ ! -f "$working_dir/.arch-chroot" ]]; then - die "'%s' does not appear to be a Arch chroot." "$working_dir" + die "'%s' does not appear to be an Arch chroot." "$working_dir" elif [[ $(cat "$working_dir/.arch-chroot") != $CHROOT_VERSION ]]; then die "chroot '%s' is not at version %s. Please rebuild." "$working_dir" "$CHROOT_VERSION" fi -- cgit v1.2.3-2-g168b From bf7dc83bab4f002a29866fd30b1574b6fbca36aa Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 19 Oct 2014 16:06:31 -0400 Subject: save and reuse original argv when auto-elevating Fixes FS#42277. --- arch-nspawn.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch-nspawn.in') diff --git a/arch-nspawn.in b/arch-nspawn.in index b85d360..19f1410 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -26,6 +26,8 @@ usage() { exit 1 } +orig_argv=("$@") + while getopts 'hC:M:c:' arg; do case "$arg" in C) pac_conf="$OPTARG" ;; @@ -38,7 +40,7 @@ done shift $(($OPTIND - 1)) (( $# < 1 )) && die 'You must specify a directory.' -check_root "$0" "$@" +check_root "$0" "${orig_argv[@]}" working_dir=$(readlink -f "$1") shift 1 -- cgit v1.2.3-2-g168b