diff options
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r-- | arch-nspawn.in | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in index e8b68cf..6c9a102 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -96,8 +96,7 @@ eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf") machine_name="${working_dir//[![:alnum:]_-]/-}" machine_name="${machine_name#-}" -#HOST_NAME_MAX="$(cpp -include limits.h <<<HOST_NAME_MAX | sed -n '$p')" -HOST_NAME_MAX=64 +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#-}" |