From ddf3352e03b409c3f5c16cbdb914e6453f36bebd Mon Sep 17 00:00:00 2001 From: Guoshuai Li Date: Thu, 22 Dec 2016 17:52:36 +0800 Subject: OVN: Fix OCF symbolic link lost after ovn-common upgrade The directory "/usr/lib/ocf/resource.d/ovn/" can only be removed on uninstall. It should not be removed when upgrading. Signed-off-by: Guoshuai Li Signed-off-by: Andy Zhou --- rhel/openvswitch-fedora.spec.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rhel') diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 6b2f91061..3499d6325 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} -- cgit v1.2.1