[am-utils] - scriptlets replaced with new systemd macros (#850023)

Ian Kent iankent at fedoraproject.org
Fri Oct 12 02:13:08 UTC 2012


commit 7c310ec8194da4993ebd4a3581202afdb2687bab
Author: Ian Kent <ikent at redhat.com>
Date:   Fri Oct 12 10:12:32 2012 +0800

    - scriptlets replaced with new systemd macros (#850023)

 am-utils.spec |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/am-utils.spec b/am-utils.spec
index 4822e03..5d3d932 100644
--- a/am-utils.spec
+++ b/am-utils.spec
@@ -1,7 +1,7 @@
 Summary: Automount utilities including an updated version of Amd
 Name: am-utils
 Version: 6.1.5
-Release: 23%{?dist}
+Release: 24%{?dist}
 License: BSD
 Epoch: 5
 Group: System Environment/Daemons
@@ -142,30 +142,25 @@ fi
 
 %post
 /sbin/ldconfig
-if [ $1 -eq 1 ] ; then 
-    # Initial installation 
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post amd.service
+
 if [ -f %{_infodir}/am-utils.info.gz ]; then
     /sbin/install-info %{_infodir}/am-utils.info.gz %{_infodir}/dir || :
 fi
 
 %preun
+%systemd_preun amd.service
+
 if [ $1 -eq 0 ]; then
    # Package removal, not upgrade
-   /bin/systemctl --no-reload disable amd.service > /dev/null 2>&1 || :
-   /bin/systemctl stop amd.service > /dev/null 2>&1 || :
    if [ -f %{_infodir}/am-utils.info.gz ]; then
       /sbin/install-info --delete %{_infodir}/am-utils.info.gz %{_infodir}/dir || :
    fi
 fi
 
 %postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    # Package upgrade, not uninstall
-    /bin/systemctl try-restart amd.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart amd.service
+
 /sbin/ldconfig
 
 %triggerun -- am-utils < 6.1.5-19
@@ -195,6 +190,9 @@ fi
 %{_libdir}/libamu.so*
 
 %changelog
+* Wed Aug 22 2012 Václav Pavlín <vpavlin at redhat.com> - 5:6.1.5-24
+- Scriptlets replaced with new systemd macros (#850023)
+
 * Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5:6.1.5-23
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list