File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -450,9 +450,8 @@ ensure_common_tools_installed () {
450450 $SUDO yum -y -q -e 0 install yum-utils
451451 fi
452452
453- # Addresses AC-Hunter issue #2185
454- if [ -x /usr/bin/subscription-manager ]; then # Only attempt this on RHEL, not Centos or other clones
455- # Note, when extending to other RHEL releases (>7.x) we'll need to test for the release version and adjust the repository name.
453+ # Enable extra repository for RHEL 7.x (addresses AC-Hunter issue #2185)
454+ if [ -x /usr/bin/subscription-manager -a -s /etc/redhat-release ] && grep -iq ' release 7' /etc/redhat-release ; then
456455 $SUDO subscription-manager repos --enable=rhel-7-server-extras-rpms
457456 fi
458457
Original file line number Diff line number Diff line change @@ -91,7 +91,10 @@ elif [ -s /etc/redhat-release ] && grep -iq 'release 7\|release 8\|release 9' /e
9191
9292 $SUDO yum -y -q -e 0 install yum-utils device-mapper-persistent-data lvm2 shadow-utils
9393
94- $SUDO yum-config-manager -q --enable extras > /dev/null
94+ # Enable "extras" repo if not RHEL or CentOS Stream
95+ if ! grep -iq ' red hat enterprise linux\|centos stream' /etc/redhat-release; then
96+ $SUDO yum-config-manager -q --enable extras > /dev/null
97+ fi
9598
9699 if [ ! -f /etc/yum.repos.d/docker-ce.repo ]; then
97100 $SUDO yum-config-manager -q --add-repo https://download.docker.com/linux/centos/docker-ce.repo > /dev/null
You can’t perform that action at this time.
0 commit comments