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

« back to all changes in this revision

Viewing changes to pcsc-lite/etc/pcscd.init.in

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Rousseau
  • Date: 2005-11-27 18:04:59 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051127180459-qrex2gzpq9d8jexd
Tags: 1.2.9-beta9-1
* New upstream version
* debian/compat: change from 3 to 4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
#
3
 
# pcscd        Starts the pcscd Daemon
4
 
#
5
 
# chkconfig:   2345 25 88
6
 
# description: The PC/SC smart card daemon is a resource manager for the \
7
 
#              PC/SC lite and Musclecard frameworks.  It coordinates \
8
 
#              communications with smart card readers, smart cards, and \
9
 
#              cryptographic tokens that are connected to the system.
10
 
#
11
 
# processname: pcscd
12
 
# config:      @confdir@/reader.conf
13
 
#
14
 
# Note!  pcscd should be started after pcmcia, and shut down before it
15
 
# for smooth experience with PCMCIA readers.
16
 
 
17
 
. @sysconfdir_exp@/init.d/functions
18
 
 
19
 
umask 077
20
 
 
21
 
exec=@sbindir_exp@/pcscd
22
 
prog=$(basename $exec)
23
 
lockfile=@localstatedir_exp@/lock/subsys/$prog
24
 
PCSCD_OPTIONS=
25
 
 
26
 
# Source config
27
 
if [ -f @sysconfdir_exp@/sysconfig/pscsd ] ; then
28
 
    . @sysconfdir_exp@/sysconfig/pcscd
29
 
fi
30
 
 
31
 
start() {
32
 
    echo -n $"Starting PC/SC smart card daemon ($prog): "
33
 
    @sbindir_exp@/update-reader.conf && daemon $prog $PCSCD_OPTIONS
34
 
    retval=$?
35
 
    echo
36
 
    [ $retval -eq 0 ] && touch $lockfile
37
 
    return $retval
38
 
}
39
 
stop() {
40
 
    echo -n $"Stopping PC/SC smart card daemon ($prog): "
41
 
    killproc $prog
42
 
    retval=$?
43
 
    echo
44
 
    [ $retval -eq 0 ] && rm -f $lockfile
45
 
    return $retval
46
 
}
47
 
restart() {
48
 
    stop
49
 
    start
50
 
}
51
 
 
52
 
 
53
 
case "$1" in
54
 
    start|stop|restart)
55
 
        $1
56
 
        ;;
57
 
    reload|force-reload)
58
 
        restart
59
 
        ;;
60
 
    status)
61
 
        status $prog
62
 
        ;;
63
 
    condrestart|try-restart)
64
 
        [ ! -f $lockfile ] || restart
65
 
        ;;
66
 
    *)
67
 
        echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
68
 
        exit 2
69
 
esac