Merge "Restore os_CODENAME for old rhel distros"

This commit is contained in:
Zuul
2025-09-16 13:16:11 +00:00
committed by Gerrit Code Review

View File

@@ -440,7 +440,7 @@ function GetOSVersion {
source /etc/os-release
if [[ "${ID}" =~ (centos|rocky|rhel) ]]; then
os_RELEASE=${VERSION_ID}
os_CODENAME=$(echo $VERSION | grep -oP '(?<=[(])[^)]*')
os_CODENAME=$(echo $VERSION | grep -oP '(?<=[(])[^)]*' || echo 'n/a')
os_VENDOR=$(echo $NAME | tr -d '[:space:]')
else
_ensure_lsb_release