home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 February
/
PCWorld_2000-02_cd.bin
/
live
/
etc
/
pcmcia
/
cdrom
< prev
next >
Wrap
Text File
|
1999-10-31
|
997b
|
54 lines
#!/bin/bash
#
# cdrom 1.11 1998/10/08 19:44:18 (David Hinds)
#
# Initialize or shutdown a PCMCIA CD-ROM device
#
# The first argument should be either 'start' or 'stop'. The second
# argument is the name for the device.
#
# The script passes an extended device address to 'cdrom.opts' in the
# ADDRESS variable, to retrieve device-specific configuration options.
# The address format is "scheme,socket" where "scheme" is the current
# PCMCIA device configuration scheme, and "socket" is the socket
# number.
#
if [ -r ./shared ] ; then . ./shared ; else . /etc/pcmcia/shared ; fi
# Get device attributes
get_info $DEVICE
# Load site-specific settings
ADDRESS="$SCHEME,$SOCKET"
. $0.opts
case "$ACTION" in
'start')
add_blkdev /dev/$DEVICE || exit 1
;;
'check')
fuser -s -m /dev/$DEVICE && exit 1
;;
'stop')
rm_blkdev /dev/$DEVICE || exit 1
;;
'cksum')
chk_simple "$3,$SOCKET" || exit 1
;;
'suspend'|'resume')
;;
*)
usage
;;
esac
exit 0