[ovs-dev] [PATCH] OVN: fix OCF symbolic link lost after ovn-common upgrade
Guoshuai Li
ligs at dtdream.com
Thu Dec 22 09:52:36 UTC 2016
The directory "/usr/lib/ocf/resource.d/ovn/" is only removed on uninstall
and can not be removed while upgrading
Signed-off-by: Guoshuai Li <ligs at dtdream.com>
---
rhel/openvswitch-fedora.spec.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 6b2f910..3499d63 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -355,7 +355,10 @@ ln -sf %{_datadir}/openvswitch/scripts/ovndb-servers.ocf /usr/lib/ocf/resource.d
%endif
%postun ovn-common
-rm -rf /usr/lib/ocf/resource.d/ovn
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ rm -rf /usr/lib/ocf/resource.d/ovn
+fi
%postun ovn-central
%if 0%{?systemd_postun_with_restart:1}
--
2.10.1.windows.1
More information about the dev
mailing list