diskimage-builder/diskimage_builder/elements/rhel/finalise.d/60-rhsm-unregister

18 lines
344 B
Plaintext
Raw Normal View History

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
export DIB_RHSM_USER=${DIB_RHSM_USER:-}
if [ -n "$DIB_RHSM_USER" ] && [ -n "$DIB_RHSM_PASSWORD" ]; then
if [[ "$DIB_REG_TYPE" == "rhn" ]]; then
rm -rf /etc/sysconfig/rhn/systemid
else
subscription-manager unregister
fi
fi