Skip to content

Commit

Permalink
YDA-5985: fix ARB update script for Ubuntu 20.04
Browse files Browse the repository at this point in the history
The script needs to take into account that certificates are
located in a different directory on Ubuntu systems.
  • Loading branch information
stsnel committed Oct 24, 2024
1 parent 995b5aa commit 50168af
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tools/arb-update-resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import os
import socket
import ssl
import sys
from collections import OrderedDict
from io import StringIO

Expand Down Expand Up @@ -192,8 +193,18 @@ def main():
args = parse_args()
env = get_irods_environment()

for ca_file_option in ["/etc/pki/tls/certs/chain.pem",
"/etc/ssl/certs/chain.crt",
"/etc/ssl/certs/localhost.crt"]:
if os.path.isfile(ca_file_option):
ca_file = ca_file_option
break
else:
print("Error: could not find CA chain file.", file=sys.stderr)
sys.exit(1)

try:
session = setup_session(env)
session = setup_session(env, ca_file=ca_file)
override_free_dict = parse_cs_values(args.override_free)
override_total_dict = parse_cs_values(args.override_total)
local_ufs_resources = get_local_ufs_resources(session)
Expand Down

0 comments on commit 50168af

Please sign in to comment.