mirror of the now-defunct rocklinux.org
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.

49 lines
1.9 KiB

  1. ACTION!="add", GOTO="hotplug_not_add_event"
  2. # check if the device has already been claimed by a driver
  3. DRIVERS=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded"
  4. # workarounds for kernels which lack $MODALIAS support
  5. SUBSYSTEM=="ieee1394", ENV{MODALIAS}!="?*", IMPORT{program}="modalias_ieee1394"
  6. SUBSYSTEM=="serio", ENV{MODALIAS}!="?*", IMPORT{program}="modalias_serio"
  7. # load the drivers
  8. ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
  9. # the following two agents do not exist.
  10. # SUBSYSTEM=="ide", ENV{MODALIAS}!="?*", RUN+="ide.agent"
  11. # SUBSYSTEM=="vio", ENV{MODALIAS}!="?*", RUN+="vio.agent"
  12. SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
  13. SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia"
  14. # rules for subsystems which lack proper hotplug support
  15. #SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o-block"
  16. #SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc-block"
  17. SUBSYSTEM=="scsi_device", ATTR{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
  18. SUBSYSTEM=="scsi_device", ATTR{type}=="1", RUN+="/sbin/modprobe osst", \
  19. ATTR{vendor}=="Onstream", ATTR{model}!="ADR*"
  20. SUBSYSTEM=="scsi_device", ATTR{type}=="1", RUN+="/sbin/modprobe st", \
  21. ATTR{vendor}=="Onstream", ATTR{model}=="ADR*"
  22. SUBSYSTEM=="scsi_device", ATTR{type}=="1", RUN+="/sbin/modprobe st", \
  23. ATTR{vendor}!="Onstream"
  24. SUBSYSTEM=="scsi_device", ATTR{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
  25. SUBSYSTEM=="scsi_device", ATTR{type}=="[235689]", RUN+="/sbin/modprobe sg"
  26. # From here on follows the hotplug agents which do not load modules
  27. LABEL="hotplug_driver_loaded"
  28. # FIXME: does a sane default exist?
  29. #SUBSYSTEM=="scsi_device", ATTR{idVendor}=="...", \
  30. # RUN+="scsi-re-add"
  31. SUBSYSTEM=="firmware", RUN+="/bin/sh -c '/etc/hotplug/firmware.agent &'"
  32. LABEL="hotplug_not_add_event"
  33. SUBSYSTEM=="net", RUN+="/bin/sh -c '/etc/hotplug/net.agent &'"
  34. # Log every event to /dev/hotplug.log (for debugging).
  35. #RUN+="logger.agent"