]> git.pld-linux.org Git - packages/pcsc-lite.git/commitdiff
- add upstart config auto/th/pcsc-lite-1_7_0-2
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 28 Aug 2011 11:36:03 +0000 (11:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pcsc-lite-pcscd.init -> 1.16
    pcsc-lite.spec -> 1.59
    pcscd.upstart -> 1.1

pcsc-lite-pcscd.init
pcsc-lite.spec
pcscd.upstart [new file with mode: 0644]

index a11adb733466ce9c87731103082fd9d62b57139b..8d7e7be5c0e793a50c2df9a1d28053705b2796e8 100644 (file)
@@ -20,6 +20,8 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+upstart_controlled
+
 umask 077
 
 # Set defaults
index f6f8fbbfed36a0629395efac48b7011162f05de1..98f3823353a36edb1a2823373e51481cf2323ead 100644 (file)
@@ -5,12 +5,12 @@
 #
 # Conditional build:
 %bcond_without udev    # use libusb instead of libudev
-#
+
 Summary:       PCSC Framework for Linux
 Summary(pl.UTF-8):     Środowisko PCSC dla Linuksa
 Name:          pcsc-lite
 Version:       1.7.0
-Release:       1
+Release:       2
 License:       BSD
 Group:         Daemons
 # Source0Download: http://alioth.debian.org/project/showfiles.php?group_id=30105
@@ -18,6 +18,7 @@ Source0:      http://alioth.debian.org/frs/download.php/3527/%{name}-%{version}.tar.b
 # Source0-md5: df69029ddbf62b9ae5f9307183d19a4d
 Source1:       %{name}-pcscd.init
 Source2:       %{name}-pcscd.sysconfig
+Source3:       pcscd.upstart
 Patch0:                %{name}-fhs.patch
 Patch1:                %{name}-any.patch
 Patch2:                noautostart.patch
@@ -134,7 +135,7 @@ rm -f doc/api/*.{map,md5}
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{usbdropdir} \
-       $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
+       $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,init} \
        $RPM_BUILD_ROOT%{_sysconfdir}/reader.conf.d \
        $RPM_BUILD_ROOT/var/run/pcscd \
        $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
@@ -145,9 +146,10 @@ install -d $RPM_BUILD_ROOT%{usbdropdir} \
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
 
 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pcscd
-cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pcscd
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pcscd
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/init/pcscd
 
-cp -a doc/example/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p doc/example/*.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -180,6 +182,7 @@ fi
 %dir %{_libdir}/pcsc/drivers
 %dir %{_sysconfdir}/reader.conf.d
 %attr(754,root,root) /etc/rc.d/init.d/pcscd
+%config(noreplace) %verify(not md5 mtime size) /etc/init/pcscd.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pcscd
 %{_mandir}/man5/reader.conf.5*
 %{_mandir}/man8/pcscd.8*
diff --git a/pcscd.upstart b/pcscd.upstart
new file mode 100644 (file)
index 0000000..2852802
--- /dev/null
@@ -0,0 +1,24 @@
+description "PC/SC Smartcard daemon"
+
+# Note!  pcscd should be started after pcmcia, and shut down before it
+# for smooth experience with PCMCIA readers.
+
+# Set defaults
+env LOGLEVEL=""
+env PCSCD_OPTIONS=""
+
+respawn
+expect fork
+
+script
+       [ -f /etc/sysconfig/pcscd ] && . /etc/sysconfig/pcscd
+
+       local logopt
+       case "$LOGLEVEL" in
+       debug|info|error|critical)
+               logopt=--$LOGLEVEL
+       ;;
+       esac
+
+       exec /usr/sbin/pcscd $logopt $PCSCD_OPTIONS
+end script
This page took 0.045757 seconds and 4 git commands to generate.