Skip to content

Commit f07fd85

Browse files
author
torri
committed
fix for broken curl installation
1 parent 65c76f2 commit f07fd85

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

init/eessi_environment_variables

+16
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ function show_msg {
1515
fi
1616
}
1717

18+
function check_rhel_ca {
19+
20+
os=$(grep -oP '(?<=^ID_LIKE=).+' /etc/os-release | tr -d '"')
21+
22+
version_id=$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"')
23+
version_major=${version_id%\.*}
24+
25+
if [[ $os =~ "rhel" ]] && [ $version_major -gt 7 ]
26+
then
27+
export CURL_CA_BUNDLE=/etc/pki/tls/certs/ca-bundle.crt
28+
fi
29+
}
30+
31+
1832
# set up minimal environment: $EESSI_PREFIX, $EESSI_VERSION, $EESSI_OS_TYPE, $EESSI_CPU_FAMILY, $EPREFIX
1933
source $EESSI_INIT_DIR_PATH/minimal_eessi_env
2034

@@ -106,6 +120,8 @@ if [ -d $EESSI_PREFIX ]; then
106120
false
107121
fi
108122

123+
# Fix wrong path for RHEL >=8 libcurl
124+
check_rhel_ca
109125

110126
else
111127
error "EESSI software layer at $EESSI_SOFTWARE_PATH not found!"

0 commit comments

Comments
 (0)