From d808e2fcf5d1770f013040776dce447c71b4664b Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Tue, 17 Nov 2020 17:40:47 +0100 Subject: [PATCH 1/2] CCDB-API: tokens are handled differently on GRID --- CCDB/src/CcdbApi.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CCDB/src/CcdbApi.cxx b/CCDB/src/CcdbApi.cxx index 52e61710d0775..103893c58535b 100644 --- a/CCDB/src/CcdbApi.cxx +++ b/CCDB/src/CcdbApi.cxx @@ -656,6 +656,9 @@ bool CcdbApi::checkAlienToken() const // a somewhat weird construction to programmatically find out if we // have a GRID token; Can be replaced with something more elegant once // alien-token-info does not ask for passwords interactively + if (getenv("JALIEN-TOKEN-CERT")) { + return true; + } auto returncode = system("timeout 1s timeout 1s alien-token-info &> /dev/null"); return returncode == 0; } From 5f2acdb928bb5b96d3a053bce3f56b95b1ec1baa Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Tue, 17 Nov 2020 17:58:31 +0100 Subject: [PATCH 2/2] Update CcdbApi.cxx --- CCDB/src/CcdbApi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CCDB/src/CcdbApi.cxx b/CCDB/src/CcdbApi.cxx index 103893c58535b..d6f6c270e41c2 100644 --- a/CCDB/src/CcdbApi.cxx +++ b/CCDB/src/CcdbApi.cxx @@ -656,7 +656,7 @@ bool CcdbApi::checkAlienToken() const // a somewhat weird construction to programmatically find out if we // have a GRID token; Can be replaced with something more elegant once // alien-token-info does not ask for passwords interactively - if (getenv("JALIEN-TOKEN-CERT")) { + if (getenv("JALIEN_TOKEN_CERT")) { return true; } auto returncode = system("timeout 1s timeout 1s alien-token-info &> /dev/null");