From 49285db4d3ffa7f53ab50b968430a30e76db5e0f Mon Sep 17 00:00:00 2001 From: David Hill Date: Mon, 13 Jun 2022 20:38:48 -0400 Subject: [PATCH] Add a warning in satellite configuration Add a warning in satellite configuration as when no activation_key is provided and no environment is configured, subscription-manager might hang as it's prompting the user to provide the missing parameter. Change-Id: I9564841ca845eafc2bd39be6b05bef62e8062f28 --- .../os-refresh-config/pre-configure.d/06-rhel-registration | 3 +++ 1 file changed, 3 insertions(+) diff --git a/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration b/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration index d38ac780..d2824814 100755 --- a/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration +++ b/diskimage_builder/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration @@ -129,6 +129,9 @@ case "${REG_METHOD:-}" in fi ;; satellite) + if [ -z "${REG_ACTIVATION_KEY}" -a -z "${REG_ENVIRONMENT}" ]; then + echo "WARNING: subscription-manager register might hang if REG_ACTIVATION_KEY and REG_ENVIRONMENT are not provided." + fi # Save an unmodified copy of the repo list for logging user_repos=$repos repos="$repos --enable ${satellite_repo}"