Skip to content

Commit 953e675

Browse files
authored
RHEL identity update for 8 (#69)
RHEL 8 removed the word "Server" from the PRETTY NAME. This caused RHEL 8 servers to not be able to identify
1 parent 71f6156 commit 953e675

File tree

1 file changed

+2
-2
lines changed
  • modules/bash-commons/src

1 file changed

+2
-2
lines changed

modules/bash-commons/src/os.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ function os_is_centos {
3030
}
3131

3232
# Returns true (0) if this is a RedHat server at the given version or false (1) otherwise. The version number
33-
# can use regex. If you don't care about the version, leave it unspecified.
33+
# can use regex. If you don't care about the version, leave it unspecified. RedHat 8+ removed the word "Server".
3434
function os_is_redhat {
3535
local -r version="$1"
36-
grep -q "Red Hat Enterprise Linux Server release $version" /etc/*release
36+
grep -q "Red Hat Enterprise Linux release $version" /etc/*release || grep -q "Red Hat Enterprise Linux Server release $version" /etc/*release
3737
}
3838

3939

0 commit comments

Comments
 (0)