summaryrefslogtreecommitdiff
path: root/rhel
diff options
context:
space:
mode:
Diffstat (limited to 'rhel')
-rw-r--r--rhel/openvswitch-kmod-rhel6.spec.in14
1 files changed, 10 insertions, 4 deletions
diff --git a/rhel/openvswitch-kmod-rhel6.spec.in b/rhel/openvswitch-kmod-rhel6.spec.in
index 5d46838a9..8413b254f 100644
--- a/rhel/openvswitch-kmod-rhel6.spec.in
+++ b/rhel/openvswitch-kmod-rhel6.spec.in
@@ -43,10 +43,6 @@ Open vSwitch Linux kernel module.
%prep
%setup -n %{oname}-%{version}
-cat > %{oname}.conf << EOF
-override %{oname} * extra/%{oname}
-override %{oname} * weak-updates/%{oname}
-EOF
%build
for flavor in %flavors_to_build; do
@@ -66,7 +62,17 @@ for flavor in %flavors_to_build ; do
find $INSTALL_MOD_PATH/lib/modules -iname 'modules.*' -exec rm {} \;
done
install -d %{buildroot}%{_sysconfdir}/depmod.d/
+for module in %{buildroot}/lib/modules/%{kernel_version}/$INSTALL_MOD_DIR/*.ko;
+do
+ modname="$(basename ${module})"
+ echo "override ${modname%.ko} * extra/%{oname}" >> %{oname}.conf
+ echo "override ${modname%.ko} * weak-updates/%{oname}" >> %{oname}.conf
+done
install -m 644 %{oname}.conf %{buildroot}%{_sysconfdir}/depmod.d/
+%files
+%defattr(644,root,root)
+/etc/depmod.d/%{oname}.conf
+
%clean
rm -rf $RPM_BUILD_ROOT