~ubuntu-branches/ubuntu/jaunty/pcsc-lite/jaunty-security

« back to all changes in this revision

Viewing changes to etc/pcscd.startup

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Rousseau
  • Date: 2004-06-13 21:45:56 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040613214556-zio7hrzkz9wwtffx
Tags: 1.2.9-beta2-2
* debian/rules: add -lpthread to LDFLAGS so that pthread_* symbols are
  included in the library (problem only seen on mips and mipsel).
  Closes: #253629
* debian/control: make libpcsclite-dev and libpcsclite1 at Priority:
  optional so that other packages at Priority: optional can use them.
  Closes: #249374

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# pcscd        Starts the pcscd Daemon
 
4
#
 
5
#
 
6
# chkconfig: 2345 12 88
 
7
# description: PCSC Smart Card Daemon
 
8
#
 
9
# processname: pcscd
 
10
# config: /etc/reader.conf
 
11
 
 
12
. /etc/init.d/functions
 
13
 
 
14
# Source config
 
15
if [ -f /etc/sysconfig/pscsd ] ; then
 
16
        . /etc/sysconfig/pcscd
 
17
else
 
18
        PCSCD_OPTIONS=""
 
19
fi
 
20
 
 
21
[ -f /usr/local/sbin/pcscd ] || exit 0
 
22
 
 
23
 
 
24
 
 
25
# Source config
 
26
PATH=/sbin:/bin:/usr/local/sbin:/usr/bin:/usr/sbin
 
27
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
 
28
 
 
29
umask 077
 
30
 
 
31
start() {
 
32
        echo -n $"Starting smart card daemon: "
 
33
        daemon pcscd $PCSCD_OPTIONS
 
34
        RETVAL=$?
 
35
        echo
 
36
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pcscd
 
37
        return $RETVAL
 
38
}       
 
39
stop() {
 
40
        echo -n $"Shutting down smart card daemon: "
 
41
        killproc pcscd
 
42
        RETVAL=$?
 
43
        echo
 
44
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/pcscd
 
45
        return $RETVAL
 
46
}
 
47
rhstatus() {
 
48
        status pcscd
 
49
}
 
50
restart() {
 
51
        stop
 
52
        start
 
53
}       
 
54
 
 
55
case "$1" in
 
56
  start)
 
57
        start
 
58
        ;;
 
59
  stop)
 
60
        stop
 
61
        ;;
 
62
  status)
 
63
        rhstatus
 
64
        ;;
 
65
  restart|reload)
 
66
        restart
 
67
        ;;
 
68
  condrestart)
 
69
        [ -f /var/lock/subsys/pcscd ] && restart || :
 
70
        ;;
 
71
  *)
 
72
        echo $"Usage: $0 {start|stop|status|restart|condrestart}"
 
73
        exit 1
 
74
esac
 
75
 
 
76
exit $?
 
77