Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding /etc/os-release VERSION_ID #7432

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ fi
# - INSTALL_RKE2_SKIP_FAPOLICY
# If set, the install script will skip adding fapolicy rules
# Default is not set.
#
# - INSTALL_RKE2_OVERRIDE_OS_VERSION_ID
# If set, the install script will use the provided version instead of the version in /etc/os-release.
# Default is not set.


# info logs the given argument at info log level.
Expand Down Expand Up @@ -485,6 +489,9 @@ install_dev_rpm() {
# and calls yum to install the required packages.
do_install_rpm() {
. /etc/os-release
if [ x"${INSTALL_RKE2_OVERRIDE_OS_VERSION_ID}" != x"" ]; then
VERSION_ID=${INSTALL_RKE2_OVERRIDE_OS_VERSION_ID}
fi
if [ -r /etc/redhat-release ] || [ -r /etc/centos-release ] || [ -r /etc/oracle-release ] || [ -r /etc/system-release ] || [ "${ID_LIKE%%[ ]*}" = "suse" ]; then
repodir=/etc/yum.repos.d
if [ -d /etc/zypp/repos.d ]; then
Expand Down