diff options
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r-- | arch-nspawn.in | 14 |
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[@]}" \ "$@" |