From d9c70c48c53ee2dbb580e6e4ff10d58ffb24da6d Mon Sep 17 00:00:00 2001 From: Arthur Barr Date: Wed, 6 Feb 2019 14:23:25 +0000 Subject: [PATCH] Fix subscription checking logic --- mq-advanced-server-rhel/mq-buildah.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mq-advanced-server-rhel/mq-buildah.sh b/mq-advanced-server-rhel/mq-buildah.sh index a1c0176..8ca540e 100755 --- a/mq-advanced-server-rhel/mq-buildah.sh +++ b/mq-advanced-server-rhel/mq-buildah.sh @@ -63,11 +63,10 @@ readonly mqm_gid=888 microdnf_opts="--nodocs" # Check whether the host is registered with Red Hat -subscription-manager status -if [ "$?" -eq "0" ]; then +if subscription-manager status ; then # Host is subscribed, but the minimal image has no enabled repos - microdnf_opts="${microdnf_opts} --enablerepo=rhel-7-server-rpms" - # buildah run ${ctr_mq} -- microdnf microdnf --enablerepo=rhel-7-server-rpms --nodocs install ${prereq_packages} + # Note that the "bc" package is the only one in "extras" + microdnf_opts="${microdnf_opts} --enablerepo=rhel-7-server-rpms --enablerepo=rhel-7-server-extras-rpms" else # Use the Yum repositories configured on the host cp -R /etc/yum.repos.d/* ${mnt_mq}/etc/yum.repos.d/