[fedfs-utils/f18] - update systemd scriplet macros (bz850396).

Ian Kent iankent at fedoraproject.org
Mon Aug 27 10:28:52 UTC 2012


commit 0d123f065345d36175a55e26176019435c259cd8
Author: Ian Kent <raven at themaw.net>
Date:   Mon Aug 27 18:28:36 2012 +0800

    - update systemd scriplet macros (bz850396).

 fedfs-utils.spec |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)
---
diff --git a/fedfs-utils.spec b/fedfs-utils.spec
index 47e2fb1..e6a3426 100644
--- a/fedfs-utils.spec
+++ b/fedfs-utils.spec
@@ -1,6 +1,6 @@
 Name:           fedfs-utils
 Version:        0.8.0
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        Utilities for mounting and managing FedFS
 
 Group:          System Environment/Daemons
@@ -257,26 +257,13 @@ getent passwd fedfs >/dev/null || \
 exit 0
 
 %post server
-if [ $1 -eq 1 ]; then
-	# Initial installation
-	%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
-	# if fedfs-utils-server was approved to be enabled by default
-	#%{_bindir}/systemctl enable %{unit_name}.service >/dev/null 2>&1 || :
-fi
+%systemd_post() %{unit_name}.service
 
 %preun server
-if [ $1 -eq 0 ] ; then
-	#Package removal, not upgrade
-	%{_bindir}/systemctl --no-reload disable %{unit_name}.service > /dev/null 2>&1 || :
-	%{_bindir}/systemctl stop %{unit_name}.service > /dev/null 2>&1 || :
-fi
+%systemd_preun() %{unit_name}.service
 
 %postun server
-%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    # Package upgrade, not uninstall
-    %{_bindir}/systemctl try-restart %{unit_name}.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart() %{unit_name}.service
 
 %files server
 %dir %{_sharedstatedir}/fedfs
@@ -340,6 +327,9 @@ FedFS may support other network file system protocols in the future.
 %{_mandir}/man8/nsdb-*
 
 %changelog
+* Mon Aug 27 2012 Ian Kent <ikent at redhat.com> - 0.8.0-8
+- update systemd scriplet macros (bz850396).
+
 * Thu Aug 2 2012 Ian Kent <ikent at redhat.com> - 0.8.0-7
 - some more spec file changes as detailed in the packaging guildlines.
 


More information about the scm-commits mailing list