home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20110725.etc.tar.gz / bradford.20110725.etc.tar / etc / init.d / pcscd < prev    next >
Text File  |  2006-05-02  |  2KB  |  69 lines

  1. #! /bin/sh
  2. # Copyright (c) 1995-2001 SuSE GmbH Nuernberg, Germany
  3. #                    2002 SuSE Linux AG, Nuernberg, Germany
  4. #                    2005 SUSE LINUX Products GmbH, Nuernberg, Germany
  5. #
  6. # Author: Matthias Eckermann
  7. #         Wolfgang Rosenauer
  8. #
  9. #
  10. ### BEGIN INIT INFO
  11. # Provides:       pcscd
  12. # Required-Start:  $remote_fs $syslog
  13. # X-UnitedLinux-Should-Start: setserial hotplug kbd
  14. # Required-Stop:   $remote_fs $syslog
  15. # Default-Start:   2 3 5
  16. # Default-Stop:    0 1 6 
  17. # Description:     PCSC daemon handling smart card readers
  18. ### END INIT INFO
  19.  
  20.  
  21. pcscd_BIN=/usr/sbin/pcscd
  22. test -x $pcscd_BIN || exit 5
  23.  
  24. . /etc/rc.status
  25. rc_reset
  26.  
  27. case "$1" in
  28.     start)
  29.         echo -n "Starting PC/SC smart card daemon "
  30.     mount -n -t usbfs usbfs /proc/bus/usb >/dev/null 2>&1
  31.     rm -f /var/run/pcscd.pub
  32.     /usr/sbin/update-reader.conf && startproc $pcscd_BIN
  33.         rc_status -v
  34.     ;;
  35.     stop)
  36.         echo -n "Stopping PC/SC smart card daemon "
  37.         killproc -TERM $pcscd_BIN
  38.     rc_status -v
  39.         ;;
  40.     try-restart)
  41.         $0 status >/dev/null &&  $0 restart
  42.         rc_status
  43.         ;;
  44.     restart)
  45.         $0 stop
  46.         $0 start
  47.         rc_status
  48.         ;;
  49.     force-reload)
  50.         $0 stop  &&  $0 start
  51.         rc_status
  52.         ;;
  53.     reload)
  54.         echo -n "Reload PC/SC smart card daemon "
  55.         rc_failed 3
  56.         rc_status -v
  57.         ;;
  58.     status)
  59.         echo -n "Checking for PC/SC smart card daemon  "
  60.     checkproc $pcscd_BIN 
  61.     rc_status -v
  62.     ;;
  63.     *)
  64.         echo "Usage: $0 {start|stop|try-restart|restart|force-reload|reload|status}"
  65.         exit 1
  66.         ;;
  67. esac
  68. rc_exit
  69.