Load transforward module automatically
[transforward.git] / transforward.spec
index 071fd35..1c83431 100644 (file)
@@ -29,6 +29,7 @@ Vendor: PlanetLab
 Packager: PlanetLab Central <support@planet-lab.org>
 Distribution: PlanetLab %{plrelease}
 URL: %{SCMURL}
+Requires: kernel = %{kernel_version}-%{kernel_release}
 
 Summary: Kernel module that transparently forwards ports between containers
 Name: %{name}
@@ -50,12 +51,15 @@ make -C %{kernelpath} V=1 M=$(pwd) modules
 
 %install
 install -D -m 755 transforward.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/net/transforward/transforward.ko
+mkdir -p $RPM_BUILD_ROOT/etc/modules-load.d
+install -m 644 transforward.conf $RPM_BUILD_ROOT/etc/modules-load.d/transforward.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 /lib/modules/%{kernel_id}
+/etc/modules-load.d/procprotect.conf
 
 %post