Correct rhel-common for rhel6

Hardcoding subscription-manager to use rhel-7-server-rpms causes
users building rhel6 with Satellite6 to fail. This setting cannot
be overridden with environment variables, therefore needs to be
smarter. Setting RHEL_MAJ_VER in the rhel/rhel7 environment fixes.

Change-Id: Ifbd88bc76ef8b38a739272ba6e045a12849d68df
Closes-Bug: 1404364
This commit is contained in:
Abel Lopez 2016-01-11 12:03:45 -08:00
parent beae0b21f1
commit 71bd8b3a33
4 changed files with 6 additions and 4 deletions

View file

@ -31,8 +31,8 @@ REG_METHOD="$(os-apply-config --key rh_registration.method --type raw --key-defa
opts=
attach_opts=
repos="repos --enable rhel-7-server-rpms"
satellite_repo="rhel-7-server-rh-common-rpms"
repos="repos --enable rhel-${RHEL_MAJ_VER}-server-rpms"
satellite_repo="rhel-${RHEL_MAJ_VER}-server-rh-common-rpms"
if [ -n "${REG_AUTO_ATTACH:-}" ]; then
opts="$opts --auto-attach"

View file

@ -9,8 +9,8 @@ set -o pipefail
opts=
attach_opts=
repos="repos --enable rhel-7-server-rpms"
satellite_repo="rhel-7-server-rh-common-rpms"
repos="repos --enable rhel-${RHEL_MAJ_VER}-server-rpms"
satellite_repo="rhel-${RHEL_MAJ_VER}-server-rh-common-rpms"
if [ -n "${REG_AUTO_ATTACH:-}" ]; then
opts="$opts --auto-attach"

View file

@ -1 +1,2 @@
export DISTRO_NAME=rhel
export RHEL_MAJ_VER=6

View file

@ -1 +1,2 @@
export DISTRO_NAME=rhel7
export RHEL_MAJ_VER=7