build: fix rhel version detection in configure_for_system

This commit is contained in:
Jan Vaclav 2025-12-03 10:19:52 +01:00
parent 7315e7e0ee
commit de0a37b248

View file

@ -202,7 +202,7 @@ if [ -z "$P_FEDORA" -a -z "$P_RHEL" ] ; then
P_FEDORA="$x"
P_RHEL=0
else
x="$(grep -q "ID=fedora" /etc/os-release && sed -n 's/VERSION_ID=//p' /etc/os-release)"
x="$(grep -q 'ID="rhel"' /etc/os-release && sed -n 's/^VERSION_ID="*\([0-9]*\).*/\1/p' /etc/os-release)"
if test "$x" -gt 0 ; then
P_FEDORA=0
P_RHEL="$x"