From: Joni Hahkala Date: Wed, 15 Feb 2012 14:33:18 +0000 (+0000) Subject: Take only the first hostname if there are aliases X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=826c1efefa9eb3c740449f6e356ec5e85b91e665;p=glite-security-test-utils.git Take only the first hostname if there are aliases --- diff --git a/bin/generate-test-certificates.sh b/bin/generate-test-certificates.sh index 20a18f4..854e98e 100755 --- a/bin/generate-test-certificates.sh +++ b/bin/generate-test-certificates.sh @@ -999,7 +999,7 @@ function create_all { TYPE="altname3" CTYPE="altname" - create_cert $CERT_DIR/${catype}_${TYPE}_2 "$catype altname without hosname/CN=$hostname_full" ${TYPE} $DAYS + create_cert $CERT_DIR/${catype}_${TYPE}_2 "$catype altname without hostname/CN=$hostname_full" ${TYPE} $DAYS TYPE="server" CTYPE="server2" @@ -1224,8 +1224,8 @@ openssl version #get full hostname hostname_space=`hostname -A 2>/dev/null || hostname -f` -#remove trailing space -hostname_full=`echo $hostname_space` +#remove trailing space, take fist one if there are aliases +hostname_full=`echo $hostname_space | awk '{print $1}'` echo host name is [$hostname_full] export DNS_HOSTNAME=DNS:$hostname_full