2005-09-23 11:51:49 +04:00
ACTION!="add", GOTO="hotplug_not_add_event"
# check if the device has already been claimed by a driver
2006-03-29 14:19:21 +04:00
ENV{PHYSDEVDRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded"
2005-09-23 11:51:49 +04:00
# load the drivers
2005-11-25 21:35:26 +03:00
ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
2006-03-29 14:19:21 +04:00
SUBSYSTEM=="ide", ENV{MODALIAS}!="?*", RUN+="ide.agent"
2005-11-25 21:35:26 +03:00
SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia"
2005-09-23 11:51:49 +04:00
2006-03-29 14:19:21 +04:00
# rules for subsystems which lack proper hotplug support
2006-08-23 03:20:56 +04:00
SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o-block"
2006-03-29 14:19:21 +04:00
#SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc-block"
2006-08-23 03:20:56 +04:00
SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe osst", \
ATTRS{vendor}=="Onstream", ATTRS{model}!="ADR*"
SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe st", \
ATTRS{vendor}=="Onstream", ATTRS{model}=="ADR*"
SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe st", \
ATTRS{vendor}!="Onstream"
SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
SUBSYSTEM=="scsi_device", ATTRS{type}=="[235689]", RUN+="/sbin/modprobe sg"
SUBSYSTEM=="ide", ATTRS{media}=="tape", RUN+="/sbin/modprobe ide-scsi"
2005-09-23 11:51:49 +04:00
# From here on follows the hotplug agents which do not load modules
LABEL="hotplug_driver_loaded"
# FIXME: does a sane default exist?
2006-08-23 03:20:56 +04:00
#SUBSYSTEM=="scsi_device", ATTRS{idVendor}=="...", \
2006-03-29 14:19:21 +04:00
# RUN+="scsi-re-add"
2005-09-23 11:51:49 +04:00
2006-03-29 14:19:21 +04:00
SUBSYSTEM=="firmware", RUN+="firmware.agent"
2005-09-23 11:51:49 +04:00
LABEL="hotplug_not_add_event"
2005-11-25 21:35:26 +03:00
SUBSYSTEM=="net", RUN+="/bin/sh -c '/lib/udev/net.agent &'"
2005-09-23 11:51:49 +04:00
2005-11-25 21:35:26 +03:00
# Log every event to /dev/hotplug.log (for debugging).
2006-03-29 14:19:21 +04:00
#RUN+="logger.agent"
2005-09-23 11:51:49 +04:00