You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
601 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2008 OpenWrt.org
  3. START=42
  4. start() {
  5. if [ -d /sys/bus/pcmcia/devices/ ]; then
  6. # 2.6 kernels
  7. cd /sys/bus/pcmcia/devices/
  8. for PCMCIA_DEVICE in *; do
  9. if [ $PCMCIA_DEVICE == \* ]; then
  10. continue;
  11. fi;
  12. MODALIAS=$(cat $PCMCIA_DEVICE/modalias)
  13. echo PCMCIA: $MODALIAS $PCMCIA_DEVICE
  14. if [ -z $MODALIAS ]; then
  15. continue;
  16. fi;
  17. ACTION=add
  18. SOCKET_NO=$(echo $PCMCIA_DEVICE | cut -d. -f1)
  19. DEVICE_NO=$(echo $MODALIAS | sed 's/.*pfn\(..\).*/\1/')
  20. export MODALIAS ACTION SOCKET_NO DEVICE_NO
  21. /sbin/hotplug-call pcmcia
  22. done;
  23. fi;
  24. }