tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/scripts/rhel-unregistration
Jill Rouleau 971d97bf99 Correct file modes for rpmlint failures
Numerous files have incorrect modes set. Correct these so that executables
have 755 and yaml files are 644 to address rpmlint errors.

Change-Id: I8db36209b41a492f6b85e3469994de884bf556e8
2018-12-14 13:21:28 -07:00

22 lines
612 B
Bash
Executable File

#!/bin/bash
set -eux
set -o pipefail
case "${REG_METHOD:-}" in
portal|satellite)
# Allow unregistration to fail.
# We don't want to fail stack deletes if unregistration fails.
# Note that this will be a no-op on satellite 5, which doesn't support
# unregistering from the cli.
subscription-manager unregister || true
subscription-manager clean || true
;;
disable)
echo "Disabling RHEL unregistration"
;;
*)
echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD."
exit 0
esac