hostname is not defined by POSIX, use portable uname -n instead.

This commit is contained in:
Geert Hendrickx 2020-08-26 18:40:47 +02:00
parent b4cbe7674a
commit 09c276ffa2

View File

@ -136,7 +136,7 @@ declare -r PROG_NAME="$(basename "$0")"
declare -r RUN_DIR="$(dirname "$0")"
declare -r SYSTEM="$(uname -s)"
declare -r SYSTEMREV="$(uname -r)"
HNAME="$(hostname)"
HNAME="$(uname -n)"
HNAME="${HNAME%%.*}"
declare CMDLINE
CMDLINE_PARSED="" # This makes sure we don't let early fatal() write into files when files aren't created yet