Skip to content

Commit 71f6156

Browse files
authored
Add CentOS Stream support to OS check function (#62)
1 parent 7b44cfc commit 71f6156

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ function os_is_ubuntu {
2222
grep -q "Ubuntu $version" /etc/*release
2323
}
2424

25-
# Returns true (0) if this is a CentOS server at the given version or false (1) otherwise. The version number
25+
# Returns true (0) if this is a CentOS/CentOS Stream server at the given version or false (1) otherwise. The version number
2626
# can use regex. If you don't care about the version, leave it unspecified.
2727
function os_is_centos {
2828
local -r version="$1"
29-
grep -q "CentOS Linux release $version" /etc/*release
29+
grep -q "CentOS Linux release $version" /etc/*release || grep -q "CentOS Stream release $version" /etc/*release
3030
}
3131

3232
# Returns true (0) if this is a RedHat server at the given version or false (1) otherwise. The version number

0 commit comments

Comments
 (0)