if [ ! -d 'grid-security/certificates-slashwithoutnamespaces' ]; then
mkdir -p 'grid-security/certificates-slashwithoutnamespaces'
fi
- hash=$(openssl x509 -subject_hash_old -noout -in $1-ca/$1.cert)
+ if [ x"`openssl version`" \< x"OpenSSL 1.0.0" ]; then
+ hash=$(openssl x509 -hash -noout -in $1-ca/$1.cert)
+ else
+ hash=$(openssl x509 -subject_hash_old -noout -in $1-ca/$1.cert)
+ fi
cp $1-ca/$1.cert grid-security/certificates/${hash}.0
cp $1-ca/$1.crl grid-security/certificates/${hash}.r0
# generating a signing_policy file
openssl version
#get full hostname
-hostname_space=`hostname -A`
+hostname_space=`hostname -A 2>/dev/null || hostname -f`
#remove trailing space
hostname_full=`echo $hostname_space`
echo host name is [$hostname_full]