Skip to content

Commit

Permalink
Fixes #30313: Drop docker, atomic and goferd support from consumer RPM
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Jul 2, 2020
1 parent fc8e889 commit 37df6c0
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions templates/rhsm-katello-reconfigure.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,7 @@ chmod 644 $KATELLO_CERT_DIR/$KATELLO_SERVER_CA_CERT
echo "$KATELLO_DEFAULT_CA_DATA" > $KATELLO_CERT_DIR/$KATELLO_DEFAULT_CA_CERT
chmod 644 $KATELLO_CERT_DIR/$KATELLO_DEFAULT_CA_CERT

# if atomic or debian machine handle it the special way, else handle the regular rhel way
if [ -n "${IS_ATOMIC+1}" ] || [ -e "/run/ostree-booted" ]
then
# atomic setup
BASEURL=https://$KATELLO_SERVER/pulp/ostree/web/

# configure rhsm
# the config command was introduced in rhsm 0.96.6
subscription-manager config \
--server.hostname="$KATELLO_SERVER" \
--server.prefix="$PREFIX" \
--server.port="$PORT" \
--rhsm.repo_ca_cert="%(ca_cert_dir)s$KATELLO_SERVER_CA_CERT" \
--rhsm.baseurl="$BASEURL"
elif is_debian
if is_debian
then
# Debian setup
BASEURL=https://$KATELLO_SERVER/pulp/deb
Expand Down Expand Up @@ -111,26 +97,8 @@ if [ -d $CA_TRUST_ANCHORS ]; then
update-ca-trust enable
cp $KATELLO_CERT_DIR/$KATELLO_SERVER_CA_CERT $CA_TRUST_ANCHORS
update-ca-trust

# reload docker if it is installed and running
if [ -f /usr/lib/systemd/system/docker.service ]; then
systemctl status docker >/dev/null && \
systemctl reload docker >/dev/null 2>&1
elif [ -f /etc/init.d/docker ]; then
service docker status >/dev/null && \
service docker reload >/dev/null 2>&1
fi
fi

# restart goferd if it is installed and running
[ -f /etc/init.d/goferd ] && \
service goferd status >/dev/null && \
service goferd restart >/dev/null 2>&1

[ -f /usr/lib/systemd/system/goferd.service ] && \
[ -f /bin/systemctl ] && \
systemctl try-restart goferd >/dev/null 2>&1

# EL5 systems and subscription-manager versions before 1.18.1-1 don't have the network.fqdn fact.
# For these cases, we have to update the "hostname-override" fact
if (test -f /etc/redhat-release && grep -q -i "Red Hat Enterprise Linux Server release 5" /etc/redhat-release) || \
Expand Down

0 comments on commit 37df6c0

Please sign in to comment.