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
2005-11-25 21:35:26 +03:00
ENV{PHYSDEVDRIVER}=="?*", GOTO="hotplug_driver_loaded"
2005-09-23 11:51:49 +04:00
# workarounds for kernels which lack $MODALIAS support
2005-11-25 21:35:26 +03:00
SUBSYSTEM=="ieee1394", ENV{MODALIAS}!="?*", \
IMPORT{program}="/lib/udev/modalias_ieee1394"
SUBSYSTEM=="serio", ENV{MODALIAS}!="?*", \
IMPORT{program}="/lib/udev/modalias_serio"
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}"
SUBSYSTEM=="ide", ENV{MODALIAS}!="?*", RUN+="/lib/udev/ide.agent"
#SUBSYSTEM=="input", ENV{MODALIAS}!="?*", RUN+="/lib/udev/input.agent"
SUBSYSTEM=="vio", ENV{MODALIAS}!="?*", RUN+="/lib/udev/vio.agent"
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
SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
SUBSYSTEM=="scsi_device", SYSFS{type}=="1", RUN+="/sbin/modprobe osst", \
SYSFS{vendor}=="Onstream", SYSFS{model}!="ADR*"
SUBSYSTEM=="scsi_device", SYSFS{type}=="1", RUN+="/sbin/modprobe st", \
SYSFS{vendor}=="Onstream", SYSFS{model}=="ADR*"
SUBSYSTEM=="scsi_device", SYSFS{type}=="1", RUN+="/sbin/modprobe st", \
SYSFS{vendor}!="Onstream"
SUBSYSTEM=="scsi_device", SYSFS{type}=="[345]", RUN+="/sbin/modprobe sr_mod"
SUBSYSTEM=="scsi_device", SYSFS{type}=="[235689]", RUN+="/sbin/modprobe sg"
# From here on follows the hotplug agents which do not load modules
LABEL="hotplug_driver_loaded"
# FIXME: does a sane default exist?
#SUBSYSTEM=="scsi_device", SYSFS{idVendor}=="...", \
2005-11-25 21:35:26 +03:00
# RUN+="/lib/udev/scsi-re-add"
2005-09-23 11:51:49 +04:00
2005-11-25 21:35:26 +03:00
SUBSYSTEM=="firmware", RUN+="/lib/udev/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).
#RUN+="/lib/udev/logger.agent"
2005-09-23 11:51:49 +04:00