Skip to content

Commit

Permalink
rhel: Fixed a bug for checking the correct major version and revision.
Browse files Browse the repository at this point in the history
Fixed a bug where checking for major version 3.10 and major revision not
equal to 327 or 693 or 957 should have gone to the default else at the end.
In the current code, the default else condition will not get executed
for kernel with major version 3.10 and major revision not equal
to 327/693/957 resulting in failure to load the kernel module.

Fixes: 402efbe ("rhel: Add 4.12 kernel support in ovs-kmod-manage.sh")
Signed-off-by: Ashish Varma <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
ashish-varma authored and blp committed Jul 8, 2019
1 parent c18c020 commit 4afd1d8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions rhel/openvswitch-kmod-fedora.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,12 @@ if grep -qs "suse" /etc/os-release; then
if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
fi
elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then
if [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
[ "$major_rev" = "957" ]; then
# For RHEL 7.2, 7.4 and 7.6
if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
fi
elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] &&
{ [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \
[ "$major_rev" = "957" ]; }; then
# For RHEL 7.2, 7.4 and 7.6
if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then
%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh
fi
else
# Ensure that modprobe will find our modules.
Expand Down

0 comments on commit 4afd1d8

Please sign in to comment.