#!/bin/sh # # $Id: smartcard,v 1.1 2002/05/25 03:11:14 jaiger Exp $ # # Initialize or shutdown a PCMCIA smartcard device # # The first argument should be either 'start' or 'stop'. The second # argument is the base name for the device. # # The script passes an extended device address to 'smartcard.opts' in the # ADDRESS variable, to retrieve device-specific configuration options. # The address format is "scheme,socket,instance" where "scheme" is the # PCMCIA configuration scheme, "socket" is the socket number, and # "instance" is used to number multiple ports on a single card. # # Get device attributes if [ -r ./shared ] ; then . ./shared ; else . /etc/pcmcia/shared ; fi get_info $DEVICE # Load site-specific settings ADDRESS="$SCHEME,$SOCKET,$INSTANCE" . $0.opts case "$ACTION" in start) # start smartcard reader : ;; check) # check, whether smartcard reader is in use fuser -s /dev/gpr400 && exit 1 ;; stop) # stop smartcard reader : ;; suspend)# suspend smartcard reader : ;; resume) # resume smartcard reader : ;; *) # huh? usage ;; esac exit 0