From 4a7d26c38114db5b6dd8321f38d6564b7a94cc30 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 12 May 2022 09:42:34 -0600 Subject: [PATCH] Fix OS major version detection on CentOS Stream --- scripts/mkpkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mkpkg b/scripts/mkpkg index fcc85d392..841f7ec53 100755 --- a/scripts/mkpkg +++ b/scripts/mkpkg @@ -160,7 +160,7 @@ case "$osversion" in centos*|rhel*|f[0-9]*) case "$osversion" in centos*|rhel*) - osmajor=`sed -n -e 's/^.*release \([0-9]*\)[^0-9].*$/\1/p' /etc/redhat-release` + osmajor=`sed -n -e 's/^.*release \([0-9][0-9]*\).*$/\1/p' /etc/redhat-release` if [ $osmajor -ge 4 ]; then # RHEL 4 and up support SELinux with_selinux=true