[Drbd-dev] fix %preun script in drbd-km.spec from 8.3 package

Alessandro Bono alessandro.bono at gmail.com
Fri Oct 26 15:03:01 CEST 2012


Hi

%preun script in drbd-km.spec try to unload drbd.ko if present without check kernel version running
without this patch it's not possible to remove drbd-km package of old kernel

--- drbd-8.3.13/drbd-km.spec    2012-10-26 13:43:43.163366400 +0200
+++ drbd-8.3.13.my/drbd-km.spec 2012-10-26 13:44:33.368384889 +0200
@@ -80,10 +80,12 @@
 rm -rf %{buildroot}

 %preun %{krelver}
+if [ 'uname -r' = %{kernelversion} ]; then
 lsmod | grep drbd > /dev/null 2>&1
 if [ $? -eq 0 ]; then
     rmmod drbd
 fi
+fi

 %post %{krelver}
 # hack for distribution kernel packages,                                  



More information about the drbd-dev mailing list