dec9bb17d6
git-svn-id: svn://svn.openwrt.org/openwrt/packages@13122 3c298f89-4303-0410-b956-a3cf2f4a3e73
26 lines
601 B
Bash
Executable File
26 lines
601 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2008 OpenWrt.org
|
|
|
|
START=42
|
|
start() {
|
|
if [ -d /sys/bus/pcmcia/devices/ ]; then
|
|
# 2.6 kernels
|
|
cd /sys/bus/pcmcia/devices/
|
|
for PCMCIA_DEVICE in *; do
|
|
if [ $PCMCIA_DEVICE == \* ]; then
|
|
continue;
|
|
fi;
|
|
MODALIAS=$(cat $PCMCIA_DEVICE/modalias)
|
|
echo PCMCIA: $MODALIAS $PCMCIA_DEVICE
|
|
if [ -z $MODALIAS ]; then
|
|
continue;
|
|
fi;
|
|
ACTION=add
|
|
SOCKET_NO=$(echo $PCMCIA_DEVICE | cut -d. -f1)
|
|
DEVICE_NO=$(echo $MODALIAS | sed 's/.*pfn\(..\).*/\1/')
|
|
export MODALIAS ACTION SOCKET_NO DEVICE_NO
|
|
/sbin/hotplug-call pcmcia
|
|
done;
|
|
fi;
|
|
}
|