I am running OL 8.7 currently. In finding the variable for EL version, the output for release version of rpm returns 6 instead of the expected 8.
In looking further into the issue, the command setting the variable for el version is looking to rpm package version which has an output containing a minor version number, which in this case is the 6.
# rpm -q rpm
rpm-4.14.3-24.el8_6.x86_64
To correct for the minor version number being used to grab needed rpms, I wrote the line to set the variable a little different and it should work for other distros too.
# el version
export EL=$(rpm -q --queryformat '%{RELEASE}' rpm | grep -o "el[[:digit:]]")
Getting the value the new way might not work as the distro number reaches a double digit like 10 and above, but that is a future problem I guess.
I am running OL 8.7 currently. In finding the variable for EL version, the output for release version of rpm returns
6
instead of the expected8
.In looking further into the issue, the command setting the variable for el version is looking to rpm package version which has an output containing a minor version number, which in this case is the
6
.To correct for the minor version number being used to grab needed rpms, I wrote the line to set the variable a little different and it should work for other distros too.
Getting the value the new way might not work as the distro number reaches a double digit like 10 and above, but that is a future problem I guess.