Skip to content

Commit

Permalink
use $CPE_NAME to find the OS major version
Browse files Browse the repository at this point in the history
RHEL_VERSION isn't present in scos, but $CPE_NAME
is present in /etc/os-release on both distros.
  • Loading branch information
derekhiggins committed Sep 20, 2023
1 parent 5d189ed commit 9f83883
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions bindata/network/multus/multus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ data:
# detect which version we're using in order to copy the proper binaries
case "${ID}" in
rhcos|scos)
RHEL_VERSION=$(echo "${CPE_NAME}" | cut -f 5 -d :)
rhelmajor=$(echo $RHEL_VERSION | sed -E 's/([0-9]+)\.{1}[0-9]+(\.[0-9]+)?/\1/')
;;
rhel) rhelmajor=$(echo "${VERSION_ID}" | cut -f 1 -d .)
Expand Down
1 change: 1 addition & 0 deletions bindata/network/openshift-sdn/sdn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ spec:
# detect which version we're using in order to copy the proper binaries
case "${ID}" in
rhcos|scos)
RHEL_VERSION=$(echo "${CPE_NAME}" | cut -f 5 -d :)
rhelmajor=$(echo $RHEL_VERSION | sed -E 's/([0-9]+)\.{1}[0-9]+(\.[0-9]+)?/\1/')
;;
rhel) rhelmajor=$(echo "${VERSION_ID}" | cut -f 1 -d .)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ spec:
# detect which version we're using in order to copy the proper binaries
case "${ID}" in
rhcos|scos)
RHEL_VERSION=$(echo "${CPE_NAME}" | cut -f 5 -d :)
rhelmajor=$(echo $RHEL_VERSION | sed -E 's/([0-9]+)\.{1}[0-9]+(\.[0-9]+)?/\1/')
;;
rhel) rhelmajor=$(echo "${VERSION_ID}" | cut -f 1 -d .)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ spec:
# detect which version we're using in order to copy the proper binaries
case "${ID}" in
rhcos|scos)
RHEL_VERSION=$(echo "${CPE_NAME}" | cut -f 5 -d :)
rhelmajor=$(echo $RHEL_VERSION | sed -E 's/([0-9]+)\.{1}[0-9]+(\.[0-9]+)?/\1/')
;;
rhel) rhelmajor=$(echo "${VERSION_ID}" | cut -f 1 -d .)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ spec:
# detect which version we're using in order to copy the proper binaries
case "${ID}" in
rhcos|scos)
RHEL_VERSION=$(echo "${CPE_NAME}" | cut -f 5 -d :)
rhelmajor=$(echo $RHEL_VERSION | sed -E 's/([0-9]+)\.{1}[0-9]+(\.[0-9]+)?/\1/')
;;
rhel) rhelmajor=$(echo "${VERSION_ID}" | cut -f 1 -d .)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ spec:
# detect which version we're using in order to copy the proper binaries
case "${ID}" in
rhcos|scos)
RHEL_VERSION=$(echo "${CPE_NAME}" | cut -f 5 -d :)
rhelmajor=$(echo $RHEL_VERSION | sed -E 's/([0-9]+)\.{1}[0-9]+(\.[0-9]+)?/\1/')
;;
rhel) rhelmajor=$(echo "${VERSION_ID}" | cut -f 1 -d .)
Expand Down

0 comments on commit 9f83883

Please sign in to comment.