Codebase list hw-detect / 40d25e72-ce6b-4d2e-a203-82627703183e/main hotplug-pcmcia.sh
40d25e72-ce6b-4d2e-a203-82627703183e/main

Tree @40d25e72-ce6b-4d2e-a203-82627703183e/main (Download .tar.gz)

hotplug-pcmcia.sh @40d25e72-ce6b-4d2e-a203-82627703183e/mainraw · history · blame

#!/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