[openwsman] Use new systemd-rpm macros

vcrhonek vcrhonek at fedoraproject.org
Thu Aug 23 09:54:35 UTC 2012


commit e4a1245a35622de4afedf354ec75bdc3d40d4382
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date:   Thu Aug 23 11:54:13 2012 +0200

    Use new systemd-rpm macros

 openwsman.spec |   22 ++++++++--------------
 1 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/openwsman.spec b/openwsman.spec
index cff7f68..0355c73 100644
--- a/openwsman.spec
+++ b/openwsman.spec
@@ -15,7 +15,7 @@ BuildRequires:  perl-devel pkgconfig openssl-devel
 BuildRequires:  cmake
 BuildRequires:  systemd-units
 Version:        2.3.0
-Release:        5%{?dist}
+Release:        6%{?dist}
 Url:            http://www.openwsman.org/
 License:        BSD
 Group:          Applications/System
@@ -203,24 +203,14 @@ rm -rf %{buildroot}
 
 %post server
 /sbin/ldconfig
-if [ $1 -eq 1 ] ; then
-  # Initial installation 
-  /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post openwsmand.service
 
 %preun server
-if [ $1 = 0 ] ; then
-       /bin/systemctl --no-reload disable openwsmand.service > /dev/null 2>&1 || :
-       /bin/systemctl stop openwsmand.service > /dev/null 2>&1 || :
-fi
+%systemd_preun openwsmand.service
 
 %postun server
 rm -f /var/log/wsmand.log
-
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ "$1" -ge "1" ] ; then
-     /bin/systemctl try-restart openwsmand.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart openwsmand.service
 /sbin/ldconfig
 
 %post client -p /sbin/ldconfig
@@ -294,6 +284,10 @@ fi
 
 
 %changelog
+* Thu Aug 23 2012 Vitezslav Crhonek <vcrhonek at redhat.com> - 2.3.0-6
+- Use new systemd-rpm macros
+  Resolves: #850405
+
 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.3.0-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list