Fix subscription checking logic
This commit is contained in:
@@ -63,11 +63,10 @@ readonly mqm_gid=888
|
|||||||
|
|
||||||
microdnf_opts="--nodocs"
|
microdnf_opts="--nodocs"
|
||||||
# Check whether the host is registered with Red Hat
|
# Check whether the host is registered with Red Hat
|
||||||
subscription-manager status
|
if subscription-manager status ; then
|
||||||
if [ "$?" -eq "0" ]; then
|
|
||||||
# Host is subscribed, but the minimal image has no enabled repos
|
# Host is subscribed, but the minimal image has no enabled repos
|
||||||
microdnf_opts="${microdnf_opts} --enablerepo=rhel-7-server-rpms"
|
# Note that the "bc" package is the only one in "extras"
|
||||||
# buildah run ${ctr_mq} -- microdnf microdnf --enablerepo=rhel-7-server-rpms --nodocs install ${prereq_packages}
|
microdnf_opts="${microdnf_opts} --enablerepo=rhel-7-server-rpms --enablerepo=rhel-7-server-extras-rpms"
|
||||||
else
|
else
|
||||||
# Use the Yum repositories configured on the host
|
# Use the Yum repositories configured on the host
|
||||||
cp -R /etc/yum.repos.d/* ${mnt_mq}/etc/yum.repos.d/
|
cp -R /etc/yum.repos.d/* ${mnt_mq}/etc/yum.repos.d/
|
||||||
|
|||||||
Reference in New Issue
Block a user