File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -129,12 +129,19 @@ if ${RHEL_SUBSCRIPTION}; then
129
129
--enable " rhel-${OSVERSION} -for-$( uname -m) -baseos-rpms" \
130
130
--enable " rhel-${OSVERSION} -for-$( uname -m) -appstream-rpms"
131
131
132
+ # Disable the AWS' Red Hat Update Infrastructure (RHUI) repositories.
133
+ # Having enabled both RHUI and repos from SubMgr might cause conflicts.
132
134
if dnf repolist --enabled | grep -q " ^rhel-${OSVERSION} -baseos-rhui-rpms" ; then
133
135
sudo dnf config-manager --set-disabled " rhel-${OSVERSION} -baseos-rhui-rpms"
134
136
fi
135
137
if dnf repolist --enabled | grep -q " ^rhel-${OSVERSION} -appstream-rhui-rpms" ; then
136
138
sudo dnf config-manager --set-disabled " rhel-${OSVERSION} -appstream-rhui-rpms"
137
139
fi
140
+
141
+ # Remove the rh-amazon-rhui-client as its upgrade process re-enables the RHUI repos.
142
+ if sudo rpm -qa | grep -v rh-amazon-rhui-client; then
143
+ sudo dnf remove -y rh-amazon-rhui-client
144
+ fi
138
145
fi
139
146
fi
140
147
You can’t perform that action at this time.
0 commit comments