From 9ef7aba0e5553a8077779bf2c60f2b495752eaac Mon Sep 17 00:00:00 2001 From: Honggang Li Date: Thu, 1 Feb 2018 06:22:49 -0500 Subject: [PATCH] Fix preuninstall script Resolves: bz1540934 Signed-off-by: Honggang Li --- opensm.spec | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/opensm.spec b/opensm.spec index cc29b82..aa3efca 100644 --- a/opensm.spec +++ b/opensm.spec @@ -2,7 +2,7 @@ Name: opensm Version: 3.3.20 -Release: 6%{?dist} +Release: 7%{?dist} Summary: OpenIB InfiniBand Subnet Manager and management utilities Group: System Environment/Daemons License: GPLv2 or BSD @@ -90,17 +90,12 @@ mkdir -p ${RPM_BUILD_ROOT}/var/cache/opensm %systemd_post opensm.service %preun -# Don't use the macro because we need to remove our cache directory as well -# and the macro doesn't have the ability to do that. But, here the macro -# is for future reference: -# %systemd_preun opensm.service -if [ $1 = 0 ]; then - /bin/systemctl --no-reload disable opensm.service >/dev/null 2>&1 || : - /bin/systemctl stop opensm.service >/dev/null 2>&1 || : - rm -fr /var/cache/opensm -fi +%systemd_preun opensm.service %postun +if [ -d /var/cache/opensm ]; then + rm -fr /var/cache/opensm +fi %systemd_postun_with_restart opensm.service %post libs -p /sbin/ldconfig @@ -131,6 +126,11 @@ fi %{_libdir}/lib*.a %changelog +* Thu Feb 1 2018 Honggang Li - 3.3.20-7 +- Fix BuildRequires +- Fix preuninstall script +- Resolves: bz1540934 + * Mon Aug 28 2017 Honggang Li - 3.3.20-6 - Add support for s309x