diff --git a/scripts/devenv-builder/configure-vm.sh b/scripts/devenv-builder/configure-vm.sh index ba377dbb00..f090ef2cf5 100755 --- a/scripts/devenv-builder/configure-vm.sh +++ b/scripts/devenv-builder/configure-vm.sh @@ -9,15 +9,17 @@ BUILD_AND_RUN=true INSTALL_BUILD_DEPS=true FORCE_FIREWALL=false RHEL_SUBSCRIPTION=false +SET_RHEL_RELEASE=true start=$(date +%s) function usage() { - echo "Usage: $(basename "$0") [--no-build] [--no-build-deps] [--force-firewall] " + echo "Usage: $(basename "$0") [--no-build] [--no-build-deps] [--force-firewall] [--no-set-release-version] " echo "" - echo " --no-build Do not build, install and start MicroShift" - echo " --no-build-deps Do not install dependencies for building binaries and RPMs (implies --no-build)" - echo " --force-firewall Install and configure firewalld regardless of other options" + echo " --no-build Do not build, install and start MicroShift" + echo " --no-build-deps Do not install dependencies for building binaries and RPMs (implies --no-build)" + echo " --force-firewall Install and configure firewalld regardless of other options" + echo " --no-set-release-version Do NOT set the release subscription to the current release version" [ -n "$1" ] && echo -e "\nERROR: $1" exit 1 @@ -38,6 +40,10 @@ while [ $# -gt 1 ]; do FORCE_FIREWALL=true shift ;; + --no-set-release-version) + SET_RHEL_RELEASE=false + shift + ;; *) usage ;; esac done @@ -65,6 +71,14 @@ if ${RHEL_SUBSCRIPTION}; then if ! sudo subscription-manager status >&/dev/null; then sudo subscription-manager register fi + + if ${SET_RHEL_RELEASE}; then + # https://access.redhat.com/solutions/238533 + source /etc/os-release + sudo subscription-manager release --set ${VERSION_ID} + sudo subscription-manager release --show + sudo dnf clean all -y + fi fi # FIXME: Temporarily disable selinux until we update the version of