From 255327663550b796e67ea5fb2ab245034d3697e5 Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa@centosproject.org>
Date: Sun, 27 Jun 2021 21:01:07 -0400
Subject: [PATCH 20007/20007] Add support for detecting the Hyperscale variant
in liveinst
Anaconda does not rely on os-release(5) data directly to determine
which product data to load, but instead needs either a /.buildstamp
file or logic to populate environment variables to have Anaconda
select the right configuration.
This change adds logic to set the ANACONDA_PRODUCTVARIANT variable
when the Hyperscale variant is detected on the system.
---
data/liveinst/liveinst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst
index 4e3a670f3..b7106bbc1 100755
--- a/data/liveinst/liveinst
+++ b/data/liveinst/liveinst
@@ -50,6 +50,14 @@ if [ -f /etc/system-release ]; then
export ANACONDA_PRODUCTVERSION=$( cat /etc/system-release | sed -r -e 's/^.* ([0-9\.]+).*$/\1/' )
fi
+# set PRODUCTVARIANT if this is a CentOS Stream Hyperscale live image
+if [ -f /etc/os-release ]; then
+ variantid=$( grep VARIANT_ID /etc/os-release | tail -1 | cut -d= -f2)
+ if [ "$variantid" = "hyperscale" ]; then
+ export ANACONDA_PRODUCTVARIANT="Hyperscale"
+ fi
+fi
+
# set PRODUCTVARIANT if this is a Fedora Workstation live image
# FIXME really, livemedia-creator should include .buildstamp in live
# images, if it did, we could remove this:
--
2.32.0