Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #30312: Drop docker, atomic and goferd support from consumer RPM #289

Merged
merged 1 commit into from
Jul 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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