Skip to content

Commit

Permalink
Merge pull request #1423 from larsewi/unknown
Browse files Browse the repository at this point in the history
ENT-11808: detect-environment: Fixed version detection for RHEL
  • Loading branch information
nickanderson authored May 23, 2024
2 parents 38fe467 + 4f0a6ba commit 19dd2e9
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions build-scripts/detect-environment
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,11 @@ detect_distribution()
"Red Hat Enterprise Linux Server release "*)
VER=${REL#Red Hat Enterprise Linux Server release }
VER=${VER% \(*};
case "$VER" in
[0-9].[0-9]);;
*)
if ! echo "$VER" | egrep '^[0-9]+.[0-9]+$' > /dev/null
then
echo "Unknown RHEL Server version: $VER"
exit 42;;
esac
exit 42
fi

OS=rhel
OS_VERSION="$VER"
Expand All @@ -130,12 +129,11 @@ detect_distribution()
"Red Hat Enterprise Linux release "*)
VER=${REL#Red Hat Enterprise Linux release }
VER=${VER% \(*};
case "$VER" in
[0-9].[0-9]);;
*)
if ! echo "$VER" | egrep '^[0-9]+.[0-9]+$' > /dev/null
then
echo "Unknown RHEL Server version: $VER"
exit 42;;
esac
exit 42
fi

OS=rhel
OS_VERSION="$VER"
Expand Down

0 comments on commit 19dd2e9

Please sign in to comment.