Re: weird removable media behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mikkel:
And all the SCSI device rules as well. Because USB storage devices
are handled as SCSI devices.

ACTION=="add", SUBSYSTEM=="usb_device", \
        PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf
bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
        NAME="%c", MODE="0644"

ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*",
RUN+="/sbin/modprobe $env{MODALIAS}"

ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh
-c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'"

# sd:           0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
# sr:           4 TYPE_WORM, 5 TYPE_ROM
# st/osst:      1 TYPE_TAPE
# sg:           8 changer, [36] scanner
ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \
        RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'"
ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="1", \
        RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'"


ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg"
ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", \
        RUN+="/sbin/modprobe sd_mod"
ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", \
        RUN+="/sbin/modprobe sr_mod"

ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="[36]", \
        SYMLINK+="scanner scanner-%k", MODE="0660"

ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{type}=="8", \
        SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk"

ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1",
SYSFS{device/vendor}=="On[sS]tream", \
        SYSFS{model}!="ADR*", RUN+="/sbin/modprobe osst"
ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1",
SYSFS{device/vendor}=="On[sS]tream", \
        SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st"
ACTION=="add", SUBSYSTEM=="scsi_device", SYSFS{type}=="1",
SYSFS{device/vendor}!="On[sS]tream", \
        RUN+="/sbin/modprobe st"



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux