From 09c276ffa2df590b627f84534bf36ed5cae36ddc Mon Sep 17 00:00:00 2001 From: Geert Hendrickx Date: Wed, 26 Aug 2020 18:40:47 +0200 Subject: [PATCH] `hostname` is not defined by POSIX, use portable `uname -n` instead. --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index 9be25f3..354c360 100755 --- a/testssl.sh +++ b/testssl.sh @@ -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