1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 23:08:07 +00:00

Merge pull request #3958 from pi-hole/Fix/centos_stream

Fix release check for centos stream
This commit is contained in:
Dan Schaper 2021-01-06 10:59:27 -08:00 committed by GitHub
commit 66dfa5fc1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -408,7 +408,7 @@ elif is_command rpm ; then
SUPPORTED_CENTOS_VERSION=7 SUPPORTED_CENTOS_VERSION=7
SUPPORTED_CENTOS_PHP_VERSION=7 SUPPORTED_CENTOS_PHP_VERSION=7
# Check current CentOS major release version # Check current CentOS major release version
CURRENT_CENTOS_VERSION=$(grep -oP '(?<= )[0-9]+(?=\.)' /etc/redhat-release) CURRENT_CENTOS_VERSION=$(grep -oP '(?<= )[0-9]+(?=\.?)' /etc/redhat-release)
# Check if CentOS version is supported # Check if CentOS version is supported
if [[ $CURRENT_CENTOS_VERSION -lt $SUPPORTED_CENTOS_VERSION ]]; then if [[ $CURRENT_CENTOS_VERSION -lt $SUPPORTED_CENTOS_VERSION ]]; then
printf " %b CentOS %s is not supported.\\n" "${CROSS}" "${CURRENT_CENTOS_VERSION}" printf " %b CentOS %s is not supported.\\n" "${CROSS}" "${CURRENT_CENTOS_VERSION}"