~vcs-imports/hw-detect/trunk

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
37
#!/bin/sh
#
# hotplug-pcmcia.sh - Handle hotplug events for PCMCIA devices during detection
#

log () {
	logger -t hotplug-pcmcia "$@"
}

TYPE="$1"

case $TYPE in
    net)
	if [ "$INTERFACE" = "" ]; then
		log "Got net event without interface"
		exit 1
	fi

	log "Detected PCMCIA network interface $INTERFACE"
	echo $INTERFACE >>/etc/network/devhotplug
	;;

    # PCI hotplugging is deprecated (2.4 kernels only)
    pci)
	log "PCI event is deprecated."
	exit 1
	;;

    pcmcia_socket)
	log "Got pcmcia_socket event"
	;;
	
    *)
	log "Got unsupported event type \"$TYPE\""
	exit 1
	;;
esac