[rp-pppoe] bz#850300, new systemd-rpm macros in rp-pppoe spec file

Than Ngo than at fedoraproject.org
Thu Aug 21 15:52:22 UTC 2014


commit ad3f181fec0ee62f7c331ad0c8bf762f8317bea5
Author: Than Ngo <than at redhat.com>
Date:   Thu Aug 21 17:51:22 2014 +0200

    bz#850300, new systemd-rpm macros in rp-pppoe spec file

 rp-pppoe.spec |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/rp-pppoe.spec b/rp-pppoe.spec
index f595565..1ac30d6 100644
--- a/rp-pppoe.spec
+++ b/rp-pppoe.spec
@@ -1,7 +1,7 @@
 Summary: A PPP over Ethernet client (for xDSL support).
 Name: rp-pppoe
 Version: 3.11
-Release: 9%{?dist}
+Release: 10%{?dist}
 License: GPLv2+
 Group: System Environment/Daemons
 Url: http://www.roaringpenguin.com/pppoe/
@@ -84,19 +84,15 @@ rm -rf %{buildroot}/etc/ppp/pppoe.conf \
        %{buildroot}/etc/rc.d/init.d/pppoe \
        %{buildroot}%{_sysconfdir}/ppp/plugins
 
+%post
+%systemd_post pppoe-server.service
+
 %preun
-if [ "$1" = "0" ]; then
-   # Package removal, not upgrade
-   /bin/systemctl disable pppoe-server.service > /dev/null 2>&1 || :
-   /bin/systemctl stop pppoe-server.service > /dev/null 2>&1 || :
-fi
+%systemd_preun pppoe-server.service
 
 %postun
+%systemd_postun_with_restart pppoe-server.service
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    # Package upgrade, not uninstall
-    /bin/systemctl try-restart pppoe-server.service >/dev/null 2>&1 || :
-fi
 
 %triggerun -- %{name} < 3.10-9
 # Run these because the SysV package being removed won't do them
@@ -115,6 +111,9 @@ fi
 %{_mandir}/man?/*
 
 %changelog
+* Thu Aug 21 2014 Than Ngo <than at redhat.com> - 3.11-10
+- bz#850300, new systemd-rpm macros in rp-pppoe spec file
+
 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.11-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list