From 598376c20a6a12763e60e538e8c55ca7bd77e142 Mon Sep 17 00:00:00 2001 From: Joni Hahkala Date: Mon, 14 May 2012 22:37:09 +0000 Subject: [PATCH] fall back to the hostname -f if the hostname -A returns empty string without error, like it seems to do in my sl6 installation. --- bin/generate-test-certificates.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/generate-test-certificates.sh b/bin/generate-test-certificates.sh index 854e98e..207edd1 100755 --- a/bin/generate-test-certificates.sh +++ b/bin/generate-test-certificates.sh @@ -1226,6 +1226,9 @@ openssl version hostname_space=`hostname -A 2>/dev/null || hostname -f` #remove trailing space, take fist one if there are aliases hostname_full=`echo $hostname_space | awk '{print $1}'` +if [ x${hostname_full} == "x" ]; then +hostname_full=`hostname -f` + echo host name is [$hostname_full] export DNS_HOSTNAME=DNS:$hostname_full -- 1.8.2.3