# Early udev rules # wait for sysfs ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" # all block devices SUBSYSTEM=="block", GROUP="disk" # SCSI sg/st devices KERNEL=="s[gt][0-9]*", ATTRS{type}=="5", NAME="%k", GROUP="cdrom", MODE="0660" # SCSI sr devices (optical) KERNEL=="sr[0-9]*", NAME="%k", GROUP="cdrom", MODE="0660" # SCSI scanners SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="6", NAME="%k", GROUP="scanner" # load modules to scsi disks, if they aren't in kernel SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{device/type}=="0|7|14", RUN+="/sbin/modprobe sd_mod" SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{device/type}=="1", ATTRS{device/vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst" SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{device/type}=="1", RUN+="/sbin/modprobe st" SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{device/type}=="[45]", RUN+="/sbin/modprobe sr_mod" SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg" # send all events to HAL RUN+="socket:/org/freedesktop/hal/udev_event"