[tog-pegasus] Scriptlets replaced with new systemd macros

vcrhonek vcrhonek at fedoraproject.org
Thu Aug 23 09:02:15 UTC 2012


commit 0b8c8cb6919857132b9a832e0f0dda1848907799
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date:   Thu Aug 23 11:01:03 2012 +0200

    Scriptlets replaced with new systemd macros

 tog-pegasus.spec |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/tog-pegasus.spec b/tog-pegasus.spec
index 005e14c..ccb4432 100644
--- a/tog-pegasus.spec
+++ b/tog-pegasus.spec
@@ -8,7 +8,7 @@
 
 Name:           tog-pegasus
 Version:        %{major_ver}.1
-Release:        9%{?dist}
+Release:        10%{?dist}
 Epoch:          2
 Summary:        OpenPegasus WBEM Services for Linux
 
@@ -345,6 +345,7 @@ fi
 install -d -m 1750 -o root -g pegasus /var/run/tog-pegasus
 restorecon /var/run/tog-pegasus
 /sbin/ldconfig;
+%systemd_post tog-pegasus.service
 if [ $1 -ge 1 ]; then
    echo `date` >>  /var/lib/Pegasus/log/install.log 2>&1 || :;
    if [ $1 -eq 1 ] ; then
@@ -355,7 +356,6 @@ if [ $1 -ge 1 ]; then
             /usr/share/Pegasus/scripts/genOpenPegasusSSLCerts
          fi;
       fi;
-      /bin/systemctl daemon-reload >/dev/null 2>&1 || :
    fi
    if [ $1 -gt 1 ]; then
       if [ -d /var/lib/Pegasus/prev_repository ]; then
@@ -370,21 +370,16 @@ fi
 :;
 
 %preun
+%systemd_preun stop tog-pegasus.service
 if [ $1 -eq 0 ]; then                  
    # Package removal, not upgrade     
-   /bin/systemctl --no-reload disable tog-pegasus.service > /dev/null 2>&1 || :
-   /bin/systemctl stop tog-pegasus.service > /dev/null 2>&1 || :
    rm -rf /var/run/tog-pegasus
 fi
 :;
 
 %postun
 /sbin/ldconfig
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then                 
-   # Package upgrade, not uninstall   
-   /bin/systemctl try-restart tog-pegasus.service >/dev/null 2>&1 || :
-fi 
+%systemd_postun_with_restart tog-pegasus.service
 
 %preun devel
 if [ $1 -eq 0 ] ; then
@@ -439,6 +434,9 @@ fi
 
 
 %changelog
+* Wed Aug 22 2012 Lukáš Nykrýn <lnykryn at redhat.com> - 2:2.11.1-10
+- Scriptlets replaced with new systemd macros (#850411)
+
 * Tue Jul 31 2012 Vitezslav Crhonek <vcrhonek at redhat.com> - 2:2.11.1-9
 - Fix security context of /var/run/tog-pegasus in post install scriptlet
 


More information about the scm-commits mailing list