summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Xu <martinxu9.ovs@gmail.com>2018-08-01 16:00:59 -0700
committerBen Pfaff <blp@ovn.org>2018-08-03 15:16:57 -0700
commitc98638358053ee5a9f31f7acbcef20670698d0bc (patch)
treed1c188572c90960205a6f855da98bb957cc7198e
parentc8cd1307b2482df7df25e758b3cca6bebd76009f (diff)
downloadopenvswitch-c98638358053ee5a9f31f7acbcef20670698d0bc.tar.gz
rhel: bug fix kmod spec file, rhel6
This patch fixes a scenario not working for RHEL7.3 in commit 89dd5819cf18. When multiple versions passed into the kversion for the spec file, the variable is used as is for the kernel module paths for command weak-modules --add-modules. Then the modules cannot be found. Fixes: 89dd5819cf18 (rhel: support kmod-openvswitch build against multiple kernels, rhel6) Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com> CC: Greg Rose <gvrose8192@gmail.com> CC: Ben Pfaff <blp@ovn.org> CC: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
-rw-r--r--rhel/kmod-openvswitch-rhel6.spec.in6
1 files changed, 2 insertions, 4 deletions
diff --git a/rhel/kmod-openvswitch-rhel6.spec.in b/rhel/kmod-openvswitch-rhel6.spec.in
index 7ca4853ef..afbad96d9 100644
--- a/rhel/kmod-openvswitch-rhel6.spec.in
+++ b/rhel/kmod-openvswitch-rhel6.spec.in
@@ -98,10 +98,8 @@ else
[ -d "/lib/modules/$k/kernel/" ] && depmod -a "$k"
done
if [ -x "/sbin/weak-modules" ]; then
- for m in openvswitch vport-gre vport-stt vport-geneve \
- vport-lisp vport-vxlan; do
- echo "/lib/modules/%{kversion}/extra/%{oname}/$m.ko"
- done | /sbin/weak-modules --add-modules
+ rpm -ql kmod-%{oname} | grep '\.ko$' | \
+ /sbin/weak-modules --add-modules
fi
fi