Submit
Path:
~
/
/
usr
/
lib
/
udev
/
rules.d
/
File Content:
55-scsi-sg3_id.rules
# SCSI-ID mappings for sg3_utils ACTION=="remove", GOTO="sg3_utils_id_end" SUBSYSTEM=="block", GOTO="block_dev" # SCSI devices other than "block" # This code used to live in 60-persistent-storage-tape.rules. # type 8 devices are "Medium Changers" SUBSYSTEM=="scsi_generic", KERNEL=="sg*[0-9]", ATTRS{type}=="8", \ GOTO="scsi_inquiry" SUBSYSTEM=="scsi_changer", KERNEL=="sch*[0-9]", ATTRS{type}=="8", \ ENV{.INQUIRY_DEV}="$root/bsg/$id", GOTO="scsi_inquiry" # tapes need to be accessed through their bsg device KERNEL=="st*[0-9]|nst*[0-9]", SUBSYSTEMS=="scsi", KERNELS=="[0-9]*:*[0-9]", \ ENV{.INQUIRY_DEV}="$root/bsg/$id", GOTO="scsi_inquiry" GOTO="sg3_utils_id_end" LABEL="block_dev" # Import values for partitions ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_SCSI", IMPORT{parent}="SCSI_*" ENV{DEVTYPE}=="partition", ENV{ID_SCSI}=="1", GOTO="compat" # Handle non-SCSI devices that implement SCSI inquiry KERNEL=="cciss*", ENV{DEVTYPE}=="disk", GOTO="sg_inquiry" # Ignore everything else except sd/sr KERNEL!="sd*[!0-9]|sr*", GOTO="sg3_utils_id_end" # SCSI INQUIRY values # If the 'inquiry' sysfs attribute is present the kernel will already # have scanned for VPD pages, so if the vpd page attribute is not # present it is not supported (or deemed unsafe to access). # Hence we can skip the call to sg_inq and avoid I/O altogether. # Set 'ID_SCSI_INQUIRY=0' in an earlier udev rule if the kernel # fails to scan VPD pages correctly; the rules will then fall # back to calling sg_vpd directly. LABEL="scsi_inquiry" ENV{ID_SCSI_INQUIRY}=="0", GOTO="sg_inquiry" # As of 2018/4.15, the kernel doesn't provide VPD pages for "SPC" devices # (SCSI version 0x03, ANSI INCITS 301-1997) in sysfs. # It's usually safe to try though (no counter-example is known), # and for scsi_id compatibility, we have to try. SUBSYSTEMS=="scsi", ATTRS{scsi_level}=="4", GOTO="sg_inquiry" # "inquiry" is an attribute of the scsi_device in sysfs, # we obtain it by using $id after an ATTRS match. SUBSYSTEMS=="scsi", ATTRS{inquiry}=="*", KERNELS=="[0-9]*:*[0-9]", \ ENV{.SYSFS_PATH}="$sys/class/scsi_device/$id/device" ENV{.SYSFS_PATH}=="", GOTO="sg_inquiry" IMPORT{program}="/usr/bin/sg_inq --export --inhex=$env{.SYSFS_PATH}/inquiry --raw", \ ENV{ID_SCSI}="1", ENV{ID_SCSI_INQUIRY}="1" # If inquiry sysfs attribute reading it failed, fallback to sg ENV{ID_SCSI}!="1", GOTO="sg_inquiry" # Read VPD pages 80 (sn) and 83 (di) IMPORT{program}="/usr/bin/sg_inq --export --inhex=$env{.SYSFS_PATH}/vpd_pg80 --raw" IMPORT{program}="/usr/bin/sg_inq --export --inhex=$env{.SYSFS_PATH}/vpd_pg83 --raw" GOTO="compat" LABEL="sg_inquiry" # Handle devices that have no inquiry attributes in sysfs ENV{.INQUIRY_DEV}=="", ENV{.INQUIRY_DEV}="$tempnode" IMPORT{program}="/usr/bin/sg_inq --export $env{.INQUIRY_DEV}", ENV{ID_SCSI}="1" # Give up if this fails, too ENV{ID_SCSI}!="1", GOTO="sg3_utils_id_end" IMPORT{program}="/usr/bin/sg_inq --export --page=sn $env{.INQUIRY_DEV}" IMPORT{program}="/usr/bin/sg_inq --export --page=di $env{.INQUIRY_DEV}" LABEL="compat" # scsi_id compat mappings ENV{ID_VENDOR}!="?*", ENV{SCSI_VENDOR}=="?*", ENV{ID_VENDOR}="$env{SCSI_VENDOR}" ENV{ID_VENDOR_ENC}!="?*", ENV{SCSI_VENDOR_ENC}=="?*", ENV{ID_VENDOR_ENC}="$env{SCSI_VENDOR_ENC}" ENV{ID_MODEL}!="?*", ENV{SCSI_MODEL}=="?*", ENV{ID_MODEL}="$env{SCSI_MODEL}" ENV{ID_MODEL_ENC}!="?*", ENV{SCSI_MODEL_ENC}=="?*", ENV{ID_MODEL_ENC}="$env{SCSI_MODEL_ENC}" ENV{ID_REVISION}!="?*", ENV{SCSI_REVISION}=="?*", ENV{ID_REVISION}="$env{SCSI_REVISION}" ENV{ID_TYPE}!="?*", ENV{SCSI_TYPE}=="?*", ENV{ID_TYPE}="$env{SCSI_TYPE}" ENV{ID_TARGET_PORT}!="?*", ENV{SCSI_IDENT_PORT_TARGET_PORT_GROUP}=="?*", \ PROGRAM="/bin/sh -c 'echo $env{SCSI_IDENT_PORT_TARGET_PORT_GROUP} | /bin/sed s/^0x//'", \ ENV{ID_TARGET_PORT}="$result" # ID_WWN compat mapping ENV{SCSI_IDENT_LUN_NAA_REGEXT}=="?*", ENV{ID_WWN_WITH_EXTENSION}!="?*", ENV{ID_WWN_WITH_EXTENSION}="0x$env{SCSI_IDENT_LUN_NAA_REGEXT}" ENV{SCSI_IDENT_LUN_NAA_REG}=="?*", ENV{ID_WWN_WITH_EXTENSION}!="?*", ENV{ID_WWN_WITH_EXTENSION}="0x$env{SCSI_IDENT_LUN_NAA_REG}" ENV{SCSI_IDENT_LUN_NAA_EXT}=="?*", ENV{ID_WWN_WITH_EXTENSION}!="?*", ENV{ID_WWN_WITH_EXTENSION}="0x$env{SCSI_IDENT_LUN_NAA_EXT}" ENV{SCSI_IDENT_LUN_NAA_LOCAL}=="?*", ENV{ID_WWN_WITH_EXTENSION}!="?*", ENV{ID_WWN_WITH_EXTENSION}="0x$env{SCSI_IDENT_LUN_NAA_LOCAL}" # ID_WWN has max 16 characters ENV{ID_WWN_WITH_EXTENSION}=="?*", ENV{ID_WWN}!="?*", \ PROGRAM="/bin/sh -c 'echo $env{ID_WWN_WITH_EXTENSION} | /bin/sed s/^\\\(0x.\\\{1,16\\\}\\\).*/\\1/'", \ ENV{ID_WWN}="$result" # ata_id compatibility ENV{ID_SERIAL}!="?*", ENV{SCSI_IDENT_LUN_ATA}=="?*", ENV{ID_BUS}="ata", ENV{ID_ATA}="1", ENV{ID_SERIAL}="$env{SCSI_IDENT_LUN_ATA}" ENV{ID_SERIAL_SHORT}!="?*", ENV{SCSI_VENDOR}=="ATA", ENV{SCSI_IDENT_LUN_VENDOR}=="?*", ENV{ID_SERIAL_SHORT}="$env{SCSI_IDENT_LUN_VENDOR}" # Compat ID_SERIAL setting ENV{ID_SERIAL}!="?*", ENV{SCSI_IDENT_LUN_NAA_REGEXT}=="?*", ENV{ID_BUS}="scsi", ENV{ID_SERIAL}="3$env{SCSI_IDENT_LUN_NAA_REGEXT}", ENV{ID_SERIAL_SHORT}="$env{SCSI_IDENT_LUN_NAA_REGEXT}" ENV{ID_SERIAL}!="?*", ENV{SCSI_IDENT_LUN_NAA_REG}=="?*", ENV{ID_BUS}="scsi", ENV{ID_SERIAL}="3$env{SCSI_IDENT_LUN_NAA_REG}", ENV{ID_SERIAL_SHORT}="$env{SCSI_IDENT_LUN_NAA_REG}" ENV{ID_SERIAL}!="?*", ENV{SCSI_IDENT_LUN_NAA_EXT}=="?*", ENV{ID_BUS}="scsi", ENV{ID_SERIAL}="3$env{SCSI_IDENT_LUN_NAA_EXT}", ENV{ID_SERIAL_SHORT}="$env{SCSI_IDENT_LUN_NAA_EXT}" ENV{ID_SERIAL}!="?*", ENV{SCSI_IDENT_LUN_EUI64}=="?*", ENV{ID_BUS}="scsi", ENV{ID_SERIAL}="2$env{SCSI_IDENT_LUN_EUI64}", ENV{ID_SERIAL_SHORT}="$env{SCSI_IDENT_LUN_EUI64}" ENV{ID_SERIAL}!="?*", ENV{SCSI_IDENT_LUN_NAME}=="?*", ENV{ID_BUS}="scsi", ENV{ID_SERIAL}="8$env{SCSI_IDENT_LUN_NAME}", ENV{ID_SERIAL_SHORT}="$env{SCSI_IDENT_LUN_NAME}" ENV{ID_SERIAL}!="?*", ENV{SCSI_IDENT_LUN_T10}=="?*", ENV{ID_BUS}="scsi", ENV{ID_SERIAL}="1$env{SCSI_IDENT_LUN_T10}", ENV{ID_SERIAL_SHORT}="$env{SCSI_IDENT_LUN_T10}" ENV{ID_SERIAL}!="?*", ENV{SCSI_IDENT_LUN_NAA_LOCAL}=="?*", ENV{ID_BUS}="scsi", ENV{ID_SERIAL}="3$env{SCSI_IDENT_LUN_NAA_LOCAL}", ENV{ID_SERIAL_SHORT}="$env{SCSI_IDENT_LUN_NAA_LOCAL}" ENV{ID_SERIAL}!="?*", ENV{SCSI_IDENT_LUN_VENDOR}=="?*", ENV{ID_BUS}="scsi", ENV{ID_SERIAL}="0$env{SCSI_VENDOR}_$env{SCSI_MODEL}_$env{SCSI_IDENT_LUN_VENDOR}", ENV{ID_SERIAL_SHORT}="$env{SCSI_IDENT_LUN_VENDOR}" ENV{ID_SERIAL}!="?*", ENV{SCSI_IDENT_SERIAL}=="?*", ENV{ID_BUS}="scsi", ENV{ID_SERIAL}="S$env{SCSI_VENDOR}_$env{SCSI_MODEL}_$env{SCSI_IDENT_SERIAL}", ENV{ID_SERIAL_SHORT}="$env{SCSI_IDENT_SERIAL}" # Compat ID_SCSI_SERIAL setting ENV{ID_SCSI_SERIAL}!="?*", ENV{SCSI_IDENT_SERIAL}=="?*", ENV{ID_SCSI_SERIAL}="$env{SCSI_IDENT_SERIAL}" LABEL="sg3_utils_id_end"
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
01-md-raid-creating.rules
321 bytes
0644
40-usb_modeswitch.rules
42861 bytes
0644
40-vm-hotadd.rules
655 bytes
0644
50-firmware.rules
210 bytes
0644
50-udev-default.rules
4846 bytes
0644
55-dm.rules
7274 bytes
0644
55-scsi-sg3_id.rules
6664 bytes
0644
56-dm-mpath.rules
4560 bytes
0644
56-dm-parts.rules
1442 bytes
0644
56-lvm.rules
2420 bytes
0644
58-scsi-sg3_symlink.rules
2863 bytes
0644
60-autosuspend.rules
419 bytes
0644
60-block.rules
703 bytes
0644
60-cdrom_id.rules
1071 bytes
0644
60-drm.rules
413 bytes
0644
60-evdev.rules
990 bytes
0644
60-fido-id.rules
491 bytes
0644
60-input-id.rules
282 bytes
0644
60-multipath.rules
3863 bytes
0644
60-open-vm-tools.rules
250 bytes
0644
60-persistent-alsa.rules
616 bytes
0644
60-persistent-input.rules
2719 bytes
0644
60-persistent-storage-dm.rules
1794 bytes
0644
60-persistent-storage-tape.rules
2135 bytes
0644
60-persistent-storage.rules
9145 bytes
0644
60-persistent-v4l.rules
769 bytes
0644
60-sensor.rules
736 bytes
0644
60-serial.rules
1190 bytes
0644
60-tpm-udev.rules
243 bytes
0644
60-vlan.rules
68 bytes
0644
61-persistent-storage-android.rules
455 bytes
0644
63-md-raid-arrays.rules
2452 bytes
0644
64-btrfs-dm.rules
387 bytes
0644
64-btrfs-zoned.rules
346 bytes
0644
64-btrfs.rules
612 bytes
0644
64-md-raid-assembly.rules
1462 bytes
0644
64-xorg-xkb.rules
257 bytes
0644
65-libwacom.rules
1157 bytes
0644
68-del-part-nodes.rules
1141 bytes
0644
69-bcache.rules
1044 bytes
0644
69-lvm-metad.rules
5813 bytes
0644
69-md-clustered-confirm-device.rules
846 bytes
0644
70-iscsi-network-interface.rules
226 bytes
0644
70-joystick.rules
432 bytes
0644
70-memory.rules
184 bytes
0644
70-mouse.rules
734 bytes
0644
70-open-iscsi.rules
253 bytes
0644
70-power-switch.rules
576 bytes
0644
70-touchpad.rules
473 bytes
0644
70-uaccess.rules
2676 bytes
0644
71-power-switch-proliant.rules
461 bytes
0644
71-seat.rules
3810 bytes
0644
73-seat-late.rules
643 bytes
0644
73-special-net-names.rules
969 bytes
0644
75-net-description.rules
452 bytes
0644
75-probe_mtd.rules
174 bytes
0644
77-mm-broadmobi-port-types.rules
936 bytes
0644
77-mm-cinterion-port-types.rules
4401 bytes
0644
77-mm-dell-port-types.rules
1767 bytes
0644
77-mm-dlink-port-types.rules
866 bytes
0644
77-mm-ericsson-mbm.rules
8084 bytes
0644
77-mm-fibocom-port-types.rules
6416 bytes
0644
77-mm-foxconn-port-types.rules
1603 bytes
0644
77-mm-gosuncn-port-types.rules
907 bytes
0644
77-mm-haier-port-types.rules
525 bytes
0644
77-mm-huawei-net-port-types.rules
2596 bytes
0644
77-mm-linktop-port-types.rules
697 bytes
0644
77-mm-longcheer-port-types.rules
14434 bytes
0644
77-mm-mtk-port-types.rules
3282 bytes
0644
77-mm-nokia-port-types.rules
2176 bytes
0644
77-mm-qcom-soc.rules
1619 bytes
0644
77-mm-qdl-device-blacklist.rules
3155 bytes
0644
77-mm-quectel-port-types.rules
7896 bytes
0644
77-mm-sierra.rules
1856 bytes
0644
77-mm-simtech-port-types.rules
3876 bytes
0644
77-mm-telit-port-types.rules
12096 bytes
0644
77-mm-tplink-port-types.rules
739 bytes
0644
77-mm-ublox-port-types.rules
4215 bytes
0644
77-mm-x22x-port-types.rules
4602 bytes
0644
77-mm-zte-port-types.rules
17179 bytes
0644
78-graphics-card.rules
965 bytes
0644
78-sound-card.rules
4816 bytes
0644
80-debian-compat.rules
594 bytes
0644
80-drivers.rules
617 bytes
0644
80-ifupdown.rules
190 bytes
0644
80-libinput-device-groups.rules
207 bytes
0644
80-mm-candidate.rules
2142 bytes
0644
80-net-setup-link.rules
295 bytes
0644
80-udisks2.rules
10512 bytes
0644
81-net-dhcp.rules
528 bytes
0644
85-hdparm.rules
82 bytes
0644
90-bolt.rules
359 bytes
0644
90-console-setup.rules
265 bytes
0644
90-fwupd-devices.rules
281 bytes
0644
90-libinput-fuzz-override.rules
1098 bytes
0644
95-dm-notify.rules
479 bytes
0644
95-kpartx.rules
1401 bytes
0644
96-e2scrub.rules
171 bytes
0644
99-lxd-agent.rules
141 bytes
0644
99-systemd.rules
4600 bytes
0644
99-vmware-scsi-udev.rules
433 bytes
0644
N4ST4R_ID | Naxtarrr