Do RHN registration in deploy + mockbuild
Check to see if the instance is registered prior to attempting registration. Also, ensure that registration happens during mock build and during the deployment. Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
parent
785bdbae30
commit
db5fb9908a
2 changed files with 7 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ if [[ $ID == rhel ]] && ! rpm -q epel-release; then
|
|||
fi
|
||||
|
||||
# Register RHEL if we are provided with a registration script.
|
||||
if [[ -n "${RHN_REGISTRATION_SCRIPT:-}" ]]; then
|
||||
if [[ -n "${RHN_REGISTRATION_SCRIPT:-}" ]] && ! sudo subscription-manager status; then
|
||||
greenprint "🪙 Registering RHEL instance"
|
||||
sudo chmod +x $RHN_REGISTRATION_SCRIPT
|
||||
sudo $RHN_REGISTRATION_SCRIPT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue