[am-utils/f18] - Scriptlets replaced with new systemd macros (#850023).

Ian Kent iankent at fedoraproject.org
Thu Jan 10 03:18:08 UTC 2013


commit 900bc2d9b91864b8ed60a27d96f1e44350f1156b
Author: Ian Kent <ikent at redhat.com>
Date:   Thu Jan 10 11:17:26 2013 +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..9dec530 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
+* Thu Jan 10 2013 <ikent 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