From: Joni Hahkala Date: Mon, 14 May 2012 22:37:09 +0000 (+0000) Subject: fall back to the hostname -f if the hostname -A returns empty string without error... X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=598376c20a6a12763e60e538e8c55ca7bd77e142;p=glite-security-test-utils.git fall back to the hostname -f if the hostname -A returns empty string without error, like it seems to do in my sl6 installation. --- 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