From d669d785287db303d4201205875f2c59ec2e1f28 Mon Sep 17 00:00:00 2001 From: Ryan Brady Date: Mon, 22 Dec 2014 16:03:41 -0500 Subject: [PATCH] Fix for RHEL6 The correct workflow for building RHEL6 images includes not using the rhel-registration scripts in this element, but rather the 00-rhsm script. This patch updates the return value from 1 to 0 for the case when the REG_METHOD is left unset. This will allow the RHEL6 images to build without needing to set REG_METHOD. This patch also improves the note about RHEL6 image building. This patch is the result of the discussion in the comments of [1]. [1] Iff7b9fc30d5a36231598a977a9edcd55229766c5 Change-Id: I2f35b8d7d8749d44d88f06e9e2c3116ff93b88fe Closes-Bug: 1404364 --- elements/rhel-common/README.md | 1 + elements/rhel-common/pre-install.d/00-rhel-registration | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/elements/rhel-common/README.md b/elements/rhel-common/README.md index 61ae3457..4f113091 100644 --- a/elements/rhel-common/README.md +++ b/elements/rhel-common/README.md @@ -14,6 +14,7 @@ IMPORTANT NOTE: The 00-rhsm script is specific to RHEL6. If you use the REG_ variables to use with RHEL7, you do not need to set any DIB_RHSM variables. The scripts named with "rhel-registration" have not been developed or tested for RHEL6. +For information on building RHEL6 images, please see the rhel element README. Environment Variables For Image Creation ---------------------------------------- diff --git a/elements/rhel-common/pre-install.d/00-rhel-registration b/elements/rhel-common/pre-install.d/00-rhel-registration index eee5d1ba..5642e275 100755 --- a/elements/rhel-common/pre-install.d/00-rhel-registration +++ b/elements/rhel-common/pre-install.d/00-rhel-registration @@ -103,5 +103,5 @@ case "${REG_METHOD:-}" in ;; *) echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD." - exit 1 + exit 0 esac