[pcsc-lite-ccid] Switch to systemctl for restarting pcscd after upgrade

Kalev Lember kalev at fedoraproject.org
Fri Oct 14 12:56:40 UTC 2011


commit 24022d3fea769f7a4f2bf2011a9f5541a974c041
Author: Kalev Lember <kalevlember at gmail.com>
Date:   Fri Oct 14 15:43:24 2011 +0300

    Switch to systemctl for restarting pcscd after upgrade
    
    ... now that it is using native systemd unit files.

 pcsc-lite-ccid.spec |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/pcsc-lite-ccid.spec b/pcsc-lite-ccid.spec
index 0e5181a..ade6dfc 100644
--- a/pcsc-lite-ccid.spec
+++ b/pcsc-lite-ccid.spec
@@ -14,8 +14,8 @@ Source0:        http://alioth.debian.org/download.php/%{upstream_build}/ccid-%{v
 
 BuildRequires:  libusb1-devel
 BuildRequires:  pcsc-lite-devel >= %{pcsc_lite_ver}
-Requires(post): initscripts
-Requires(postun): initscripts
+Requires(post): systemd-units
+Requires(postun): systemd-units
 Requires:       pcsc-lite >= %{pcsc_lite_ver}
 Provides:       pcsc-ifd-handler
 # Provide upgrade path from 'ccid' package
@@ -42,12 +42,10 @@ cp -p src/openct/LICENSE LICENSE.openct
 
 
 %post
-[ -x %{_initrddir}/pcscd ] && %{_initrddir}/pcscd status >> /dev/null 2>&1 && %{_sbindir}/pcscd -H > /dev/null 2>&1
-exit 0
+/bin/systemctl try-restart pcscd.service >/dev/null 2>&1 || :
 
 %postun
-[ -x %{_initrddir}/pcscd ] && %{_initrddir}/pcscd status >> /dev/null 2>&1 && %{_sbindir}/pcscd -H  > /dev/null 2>&1
-exit 0
+/bin/systemctl try-restart pcscd.service >/dev/null 2>&1 || :
 
 
 %files
@@ -60,6 +58,8 @@ exit 0
 %changelog
 * Fri Oct 14 2011 Kalev Lember <kalevlember at gmail.com> - 1.4.5-1
 - Update to 1.4.5
+- Switch to systemctl for restarting pcscd after upgrade now that it is using
+  native systemd unit files.
 
 * Fri May 27 2011 Kalev Lember <kalev at smartlink.ee> - 1.4.4-1
 - Update to 1.4.4


More information about the scm-commits mailing list