diskimage-builder/elements/rhel/finalise.d/60-rhsm-unregister
aweiteka 78dbbe68fe Add support Red Hat Network (RHN)
This provides basic support to register to the Red Hat Network
(RHN Classic) for packages. The image is unregistered from RHN
before completing image build. The rhnsd service is prevented
from starting since it is not needed for packagage install.

Change-Id: I2dc124cdc6ae59a63fd94d82d77108acccc3f668
2014-01-21 14:26:35 -05:00

12 lines
217 B
Bash
Executable File

#!/bin/bash
set -e
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