Merge "Add support for Red Hat Satellite"
This commit is contained in:
commit
35aa61617a
@ -16,5 +16,6 @@ Certificate-based Red Hat Subscription Managment (RHSM) is the default registrat
|
|||||||
|
|
||||||
Set `DIB_REG_TYPE=rhn` for Red Hat Network (RHN classic) registration. The image building process will register the system to RHN and apply the associated Red Hat Enterprise Linux Server subscription so the latest package updates can be applied. At the end of the image building process, the system will be unregistered from RHN.
|
Set `DIB_REG_TYPE=rhn` for Red Hat Network (RHN classic) registration. The image building process will register the system to RHN and apply the associated Red Hat Enterprise Linux Server subscription so the latest package updates can be applied. At the end of the image building process, the system will be unregistered from RHN.
|
||||||
|
|
||||||
* For RHN username/password authentication set DIB_RHSM_USER and DIB_RHSM_PASSWORD.
|
* For RHN username/password authentication set DIB_RHSM_USER and DIB_RHSM_PASSWORD. To use a Satellite server activation key set DIB_SAT_KEY. If adding RHN channels username and password must be set.
|
||||||
* Set DIB_RHN_CHANNELS to a space-separated list of RHN channels to add. Example: `DIB_RHN_CHANNELS=rhel-x86_64-server-6 rhel-x86_64-server-6-rhscl-1`.
|
* When registering to Satellite set DIB_SAT_URL to the Satellite server URL and DIB_SAT_CERT_RPM_URL to the Satellite certificate.
|
||||||
|
* Set DIB_RHN_CHANNELS to a space-separated list of RHN channels to add. Example: `DIB_RHN_CHANNELS=rhel-x86_64-server-6 rhel-x86_64-server-6-rhscl-1`. RHN username/password is required for this.
|
||||||
|
@ -4,7 +4,22 @@ set -e
|
|||||||
|
|
||||||
if [ -n "$DIB_RHSM_USER" ] && [ -n "$DIB_RHSM_PASSWORD" ]
|
if [ -n "$DIB_RHSM_USER" ] && [ -n "$DIB_RHSM_PASSWORD" ]
|
||||||
then
|
then
|
||||||
opts="--force --username ${DIB_RHSM_USER} --password ${DIB_RHSM_PASSWORD}"
|
opts="--force"
|
||||||
|
if [[ -n "$DIB_SAT_KEY" ]]; then
|
||||||
|
opts="$opts --activationkey ${DIB_SAT_KEY}"
|
||||||
|
else
|
||||||
|
opts="$opts --username ${DIB_RHSM_USER} --password ${DIB_RHSM_PASSWORD}"
|
||||||
|
fi
|
||||||
|
if [[ -n "$DIB_SAT_URL" ]]; then
|
||||||
|
if [[ "$DIB_REG_TYPE" == "rhn" ]]; then
|
||||||
|
opts="$opts --serverUrl ${DIB_SAT_URL}"
|
||||||
|
else
|
||||||
|
opts="$opts --serverurl ${DIB_SAT_URL} --sslCACert /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ -n "$DIB_SAT_CERT_RPM_URL" ]]; then
|
||||||
|
yum install -y ${DIB_SAT_CERT_RPM_URL}
|
||||||
|
fi
|
||||||
if [[ "$DIB_REG_TYPE" == "rhn" ]]; then
|
if [[ "$DIB_REG_TYPE" == "rhn" ]]; then
|
||||||
rhnreg_ks $opts --norhnsd
|
rhnreg_ks $opts --norhnsd
|
||||||
sleep 1
|
sleep 1
|
||||||
|
Loading…
Reference in New Issue
Block a user