aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Trowbridge <trown@redhat.com>2015-06-30 10:26:42 -0400
committerJohn Trowbridge <trown@redhat.com>2015-07-09 17:01:05 -0400
commitb4eea799ef8c116fd5d5e2af42016cbd4a0abe7f (patch)
treee2d612dc212d62b4a9976b660ab3b45c504ab567
parent0405a6b248a8328edc1ca050be7e33f436b29c77 (diff)
RHEL registration shouldn't use attach with activation key
In the case of using portal registration with an activation key, the RHEL registration script is still executing a `subscription-manager attach` command. This should not happen if an activation key is provided. This is because an activation key already provides the subscriptions to attach. Change-Id: I2907bede28a9b7bef71cedeea69c876eb4949df0
-rw-r--r--extraconfig/post_deploy/rhel-registration/scripts/rhel-registration2
1 files changed, 1 insertions, 1 deletions
diff --git a/extraconfig/post_deploy/rhel-registration/scripts/rhel-registration b/extraconfig/post_deploy/rhel-registration/scripts/rhel-registration
index c2bf1894..cbbd6a1d 100644
--- a/extraconfig/post_deploy/rhel-registration/scripts/rhel-registration
+++ b/extraconfig/post_deploy/rhel-registration/scripts/rhel-registration
@@ -94,7 +94,7 @@ fi
case "${REG_METHOD:-}" in
portal)
subscription-manager register $opts
- if [ -z "${REG_AUTO_ATTACH:-}" ]; then
+ if [ -z "${REG_AUTO_ATTACH:-}" -a -z "${REG_ACTIVATION_KEY:-}" ]; then
subscription-manager attach $attach_opts
fi
subscription-manager $repos