File: pcmcia-new.sh

package info (click to toggle)
pcmciautils 018-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-updates
  • size: 488 kB
  • sloc: ansic: 3,901; lex: 222; makefile: 222; sh: 169; yacc: 105; xml: 24
file content (36 lines) | stat: -rw-r--r-- 875 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
#
# this is an examle of the /etc/init.d/pcmcia-new init script as described in
# cardmgr-to-pcmciautils.txt
#

#
# set this to the driver to use, one of:
# yenta_socket, i82365, i82092, pd6729, tcic, etc.
#
DRIVER=yenta_socket
DRIVER_OPTS=

# in case modprobe and rmmod are not in PATH: set MODUTILS_PATH to the right
# path an uncomment the following two lines:
#MODUTILS_PATH=
#export PATH=$MODUTILS_PATH:$PATH

case "$1" in
	start)
		modprobe $DRIVER $DRIVER_OPTS > /dev/null 2>&1
		modprobe pcmcia > /dev/null 2>&1 # just in case it's not auto-loaded
		;;

	stop)
		pccardctl eject
		MODULES=`lsmod | grep "pcmcia " | awk '{print $4}' | tr , ' '`
		for i in $MODULES ; do
			rmmod $i > /dev/null 2>&1
		done
		rmmod pcmcia > /dev/null 2>&1
		rmmod $DRIVER > /dev/null 2>&1
		rmmod rsrc_nonstatic > /dev/null 2>&1
		rmmod pcmcia_core > /dev/null 2>&1
		;;
esac