Merge "Allow for disabling rhel registration"

This commit is contained in:
Jenkins 2015-01-09 18:31:30 +00:00 committed by Gerrit Code Review
commit bc4880fb91
3 changed files with 14 additions and 6 deletions

View file

@ -71,7 +71,7 @@ the hostname.
#### REG\_METHOD
Sets the method of registration. Use "portal" to register a system with the
Red Hat Customer Portal. Use "satellite" to register a system with Red
Hat Satellite 6.
Hat Satellite 6. Use "disable" to skip the registration process.
#### REG\_ORG
Gives the organization to which to join the system.
@ -204,7 +204,8 @@ Heat metadata can be used to configure the rhel-common element.
method:
# Sets the method of registration. Use "portal" to register a
# system with the Red Hat Customer Portal. Use "satellite" to
# register a system with Red Hat Satellite 6.
# register a system with Red Hat Satellite 6. Use "disable" to
# skip the registration process.
Configuration Registration Examples
------------------------------------

View file

@ -118,7 +118,10 @@ case "${REG_METHOD:-}" in
# beta-rpms repo only needed to support the katello-ca rpm above.
subscription-manager repos --disable ${satellite_repo}
;;
disable)
echo "Disabling RHEL registration"
;;
*)
echo "WARNING: only 'portal' and 'satellite' are valid values for REG_METHOD."
exit 0 # keeps the stack from failing if you don't set a value in REG_METHOD
echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD."
exit 0
esac

View file

@ -97,7 +97,11 @@ case "${REG_METHOD:-}" in
# beta-rpms repo only needed to support the katello-ca rpm above.
subscription-manager repos --disable rhel-7-server-rh-common-beta-rpms
;;
disable)
echo "Disabling RHEL registration"
export REG_HALT_UNREGISTER=1 # stops attempt to unregister
;;
*)
echo "WARNING: only 'portal' and 'satellite' are valid values for REG_METHOD."
exit 1 # RHEL requires registration, fail image build if REG_Method isn't set
echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD."
exit 1
esac