diff --git a/bundles/redhat8.6/bundle.sh.gotmpl b/bundles/redhat8.6/bundle.sh.gotmpl index 3e2efe36b..9b38b2654 100755 --- a/bundles/redhat8.6/bundle.sh.gotmpl +++ b/bundles/redhat8.6/bundle.sh.gotmpl @@ -78,8 +78,8 @@ if [[ -n "${KUBERNETES_REPOS}" ]]; then ENABLED_REPOS="${ENABLED_REPOS},kubernetes" fi -if [[ -f /etc/yum.repos.d/user-repos.repo ]]; then - USER_REPOS="$(awk -F '[][]' '/^\[.*\]/ {print $2}' /etc/yum.repos.d/user-repos.repo | paste -sd, -)" +if [[ -f /etc/yum.repos.d/additional-repos.repo ]]; then + USER_REPOS="$(/usr/libexec/platform-python3.6 -c "import configparser; config = configparser.ConfigParser(); config.read('/etc/yum.repos.d/additional-repos.repo'); print(','.join(config.sections()) if config.sections() else '')")" if [[ -n "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then ENABLED_REPOS="${ENABLED_REPOS},${USER_REPOS}" elif [[ -z "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then diff --git a/bundles/redhat8.8/bundle.sh.gotmpl b/bundles/redhat8.8/bundle.sh.gotmpl index b74df65ea..ea5e9cd99 100755 --- a/bundles/redhat8.8/bundle.sh.gotmpl +++ b/bundles/redhat8.8/bundle.sh.gotmpl @@ -78,8 +78,8 @@ if [[ -n "${KUBERNETES_REPOS}" ]]; then ENABLED_REPOS="${ENABLED_REPOS},kubernetes" fi -if [[ -f /etc/yum.repos.d/user-repos.repo ]]; then - USER_REPOS="$(awk -F '[][]' '/^\[.*\]/ {print $2}' /etc/yum.repos.d/user-repos.repo | paste -sd, -)" +if [[ -f /etc/yum.repos.d/additional-repos.repo ]]; then + USER_REPOS="$(/usr/libexec/platform-python3.6 -c "import configparser; config = configparser.ConfigParser(); config.read('/etc/yum.repos.d/additional-repos.repo'); print(','.join(config.sections()) if config.sections() else '')")" if [[ -n "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then ENABLED_REPOS="${ENABLED_REPOS},${USER_REPOS}" elif [[ -z "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then