Skip to content

Commit b87a74e

Browse files
committed
install.sh adding support for some specific rhel & rocky releases ...
1 parent e49c393 commit b87a74e

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

install.sh

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ os_release_detect() {
164164
;;
165165
flavor)
166166
# Supported distro
167-
set -- debian ubuntu pop centos rhel OpenBSD
167+
set -- debian ubuntu pop centos rocky rhel OpenBSD
168168
local linux_distribution="$(egrep '^ID=' /etc/os-release | awk -F "=" '{print $2}' | tr -d "\"")"
169169
local bsd_distribution="none"
170170

@@ -218,9 +218,9 @@ os_release_detect() {
218218

219219
os_release_helper
220220
;;
221-
centos|rhel)
222-
# Supported centos releases
223-
set -- 8 9 9.1 9.2
221+
centos|rocky|rhel)
222+
# Supported centos/rocky/rhel releases
223+
set -- 8 8.8 9 9.1 9.2
224224

225225
for item in "$@";
226226
do
@@ -503,7 +503,7 @@ grpc_collector_bin_install_deb() {
503503

504504
local git_clone=1
505505
if [ ! -d "${mdt_install_dir}" ]; then
506-
git clone "${mdt_url}" -b "${mdt_version}" "${mdt_install_dir}"
506+
git clone -b "${mdt_version}" "${mdt_url}" "${mdt_install_dir}"
507507
git_clone="$?"
508508
else
509509
# assuming that the clone was already performed
@@ -554,7 +554,7 @@ grpc_collector_bin_install_rpm() {
554554

555555
local git_clone=1
556556
if [ ! -d "${mdt_install_dir}" ]; then
557-
git clone "${mdt_url}" "${mdt_install_dir}"
557+
git clone -b "${mdt_version}" "${mdt_url}" "${mdt_install_dir}"
558558
git_clone="$?"
559559
else
560560
# assuming that the clone was already performed
@@ -617,7 +617,7 @@ grpc_collector_lib_install_deb() {
617617

618618
local git_clone=1
619619
if [ ! -d "${mdt_install_dir}" ]; then
620-
git clone "${mdt_url}" -b "${mdt_version}" "${mdt_install_dir}"
620+
git clone -b "${mdt_version}" "${mdt_url}" "${mdt_install_dir}"
621621
git_clone="$?"
622622
else
623623
# assuming that the clone was already performed
@@ -672,7 +672,7 @@ grpc_collector_lib_install_rpm() {
672672

673673
local git_clone=1
674674
if [ ! -d "${mdt_install_dir}" ]; then
675-
git clone "${mdt_url}" "${mdt_install_dir}"
675+
git clone -b "${mdt_version}" "${mdt_url}" "${mdt_install_dir}"
676676
git_clone="$?"
677677
else
678678
# assuming that the clone was already performed
@@ -743,11 +743,12 @@ grpc_collector_deploy() {
743743
grpc_collector_lib_install_deb
744744
fi
745745
;;
746-
"Linux centos 8" | \
747-
"Linux centos 9" | \
748-
"Linux rhel 8" | \
749-
"Linux rhel 9" | \
750-
"Linux rhel 9.1" | \
746+
"Linux centos 8" | \
747+
"Linux centos 9" | \
748+
"Linux rocky 8.8" | \
749+
"Linux rhel 8" | \
750+
"Linux rhel 9" | \
751+
"Linux rhel 9.1" | \
751752
"Linux rhel 9.2")
752753
#echo "grpc_collector_deploy_rpm()"
753754
if [ "${_os_info}" = "Linux centos 8" ] || [ "${_os_info}" = "Linux centos 9" ]; then
@@ -760,8 +761,9 @@ grpc_collector_deploy() {
760761

761762
yum install -y epel-release >/dev/null 2>&1 || die "error - epel-release install failure" "${err_epel_failure}"
762763

763-
# Switch to a recent gcc version (old centos/rhel release)
764-
if [ "${_os_info}" = "Linux centos 8" ] || [ "${_os_info}" = "Linux rhel 8" ]; then
764+
# Switch to a recent gcc version (old centos/rocky/rhel release)
765+
if [ "${_os_info}" = "Linux centos 8" ] || [ "${_os_info}" = "Linux rhel 8" ] || [ "${_os_info}" = "Linux rocky 8.8" ]; then
766+
yum -y install gcc-toolset-11 >/dev/null 2>&1
765767
source /opt/rh/gcc-toolset-11/enable
766768
fi
767769
detect_sysrpm_lib

0 commit comments

Comments
 (0)