function central_certs () {

if [ ! -z "$X509_CERT_DIR" ] && [ -d "$X509_CERT_DIR" ]; then
    central_certs=`find $X509_CERT_DIR -maxdepth 1 -mtime -1 -name '*.r0' | wc -l`
 if [ $central_certs -gt 0 ]; then
    return 0
 else
    return 1
 fi
fi

if [ ! -d /etc/grid-security/certificates ]; then
    return 1
fi

central_certs=`find /etc/grid-security/certificates -maxdepth 1 -mtime -1 -name '*.r0' | wc -l`

if [ $central_certs -gt 0 ]; then
    return 0
else
    return 1
fi

}
