File: hotplug-pcmcia.sh

package info (click to toggle)
hw-detect 1.142
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,664 kB
  • sloc: sh: 1,408; makefile: 103; perl: 102; ansic: 39
file content (37 lines) | stat: -rwxr-xr-x 591 bytes parent folder | download | duplicates (9)
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