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>2014-11-05 13:49:50 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-11-05 13:49:50 -0500
commit34ac2931234b898d587bffe76ba061082b6c673c (patch)
tree2b613cca360a54b6285836aa0413a50158ddc147 /arch-nspawn.in
parent33f227ec628f30b70ee5b1412fd47564325b4b4c (diff)
parent98166e3454139918304b3e0a314e41628dd0c61c (diff)
Merge branch 'archlinux'libretools-20141128
Conflicts: arch-nspawn.in archbuild.in makechrootpkg.in
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r--arch-nspawn.in14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index 6c9a102..10f79f6 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
@@ -94,16 +96,8 @@ copy_hostconf
eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf")
-machine_name="${working_dir//[![:alnum:]_-]/-}"
-machine_name="${machine_name#-}"
-HOST_NAME_MAX="$(getconf HOST_NAME_MAX)"
-if [[ ${#machine_name} -gt "$HOST_NAME_MAX" ]]; then
- machine_name="${machine_name:(-${HOST_NAME_MAX})}"
- machine_name="${machine_name#-}"
-fi
-
exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \
-D "$working_dir" \
- --machine "$machine_name" \
+ --register=no \
"${mount_args[@]}" \
"$@"