On 3/22/2021 4:58 AM, Ilya Maximets wrote:
On 2/9/21 8:47 PM, Greg Rose wrote:
The ovs-kmod-manage.sh script will run weak-updates even on newer
release kernels installing a non-compatible or un-runnable kernel
module.
Update the script to never install weak-updates onto kernels with
newer major release versions.
VMware-BZ: #2717283
Signed-off-by: Greg Rose <[email protected]>
---
rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
index f147857e4..66b09472a 100644
--- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
+++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh
@@ -155,6 +155,16 @@ kmod_versions=()
kversion=$(rpm -ql ${rpmname} | grep '\.ko$' | \
sed -n -e 's/^\/lib\/modules\/\(.*\)\/extra\/.*$/\1/p' | \
sort | uniq)
+
+IFS='.\|-' read installed_major installed_minor installed_patch \
+ installed_major_rev installed_minor_rev installed_extra <<<"${kversion}"
+
+if [ "$installed_major_rev" -lt "$major_rev" ]; then
+ echo Not installing RPM with major revision "$installed_major_rev" \
+to kernel with greater major revision "$major_rev. Exiting"
I fixed formatting here a bit and applied to master. Thanks!
Best regards, Ilya Maximets.
Thanks! I kind of forgot about this one while working on other stuff.
Still need it though so much appreciated.
- Greg
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev