]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Fixing postinstall-scripts/init-puppet for CentOS 8 Stream
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 9 Jun 2021 11:44:37 +0000 (13:44 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 9 Jun 2021 11:44:37 +0000 (13:44 +0200)
postinstall-scripts/init-puppet

index 3442d9cc151c0717d3134ac5fe598d0fde8ce732..c094304bd6f957b6021143be415b59e5d8d15223 100755 (executable)
@@ -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)"