From f01044b0c6e4bad4f2ae936cbd22c1ae530fdbd6 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 9 Jun 2021 13:44:37 +0200 Subject: [PATCH] Fixing postinstall-scripts/init-puppet for CentOS 8 Stream --- postinstall-scripts/init-puppet | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/postinstall-scripts/init-puppet b/postinstall-scripts/init-puppet index 3442d9c..c094304 100755 --- a/postinstall-scripts/init-puppet +++ b/postinstall-scripts/init-puppet @@ -545,11 +545,11 @@ check_os() { info "Checking OS release ..." if [[ -f /etc/redhat-release ]] ; then - if grep --quiet -i "release 8\." /etc/redhat-release ; then + if grep --quiet --extended-regexp --ignore-case "release 8(\.|[ ]*$)" /etc/redhat-release ; then RELEASE=8 - elif grep --quiet -i "release 7\." /etc/redhat-release ; then + elif grep --quiet --ignore-case "release 7\." /etc/redhat-release ; then RELEASE=7 - elif grep --quiet -i "release 6\." /etc/redhat-release ; then + elif grep --quiet --ignore-case "release 6\." /etc/redhat-release ; then RELEASE=6 else error "Found invalid OS release: $(cat /etc/redhat-release)" -- 2.39.5