[ovs-dev] [PATCH v1] rhel: bug fix kmod-openvswitch spec file, rhel6

Martin Xu martinxu9.ovs at gmail.com
Sun Jul 29 07:02:57 UTC 2018


Previous patch removed the if condition for postun script by
mistake. The weak-update symlinks should be removed only for
uninstallation not upgrade.

VMware-BZ: #2169383

Signed-off-by: Martin Xu <martinxu9.ovs at gmail.com>
CC: Greg Rose <gvrose8192 at gmail.com>
CC: Ben Pfaff <blp at ovn.org>
CC: Flavio Leitner <fbl at redhat.com>
---
 rhel/kmod-openvswitch-rhel6.spec.in | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/rhel/kmod-openvswitch-rhel6.spec.in b/rhel/kmod-openvswitch-rhel6.spec.in
index 4e67475..f18802d 100644
--- a/rhel/kmod-openvswitch-rhel6.spec.in
+++ b/rhel/kmod-openvswitch-rhel6.spec.in
@@ -105,10 +105,12 @@ else
 fi
 
 %postun
-for kname in `ls -d /lib/modules/*`
-do
-    rm -rf $kname/weak-updates/openvswitch
-done
+if [ "$1" = 0 ]; then  # Erase, not upgrade
+    for kname in `ls -d /lib/modules/*`
+    do
+        rm -rf $kname/weak-updates/openvswitch
+    done
+fi
 /sbin/depmod -a
 
 %files
-- 
1.8.3.1



More information about the dev mailing list