Skip to content

Commit

Permalink
only set DISK_HANDLED_BY_UBM is both SLOT_NUM and SLOT_NAME are found
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaboud committed Nov 15, 2023
1 parent ad5a1cc commit 50c80ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ubm/67-ubm.rules
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ SUBSYSTEMS=="scsi", DRIVERS=="sd", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk|parti
SUBSYSTEMS=="scsi", DRIVERS=="sd", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk|partition", IMPORT{program}="/opt/45drives/ubm/id_disk %k"

# DISK_HANDLED_BY_UBM environment variable will make udev skip rules in 68-vdev.rules
ENV{SUBSYSTEM}=="block", ENV{SLOT_NUM}=="?*", ENV{DISK_HANDLED_BY_UBM}="1"
ENV{SUBSYSTEM}=="block", ENV{SLOT_NAME}=="?*", ENV{DISK_HANDLED_BY_UBM}="1"
ENV{SUBSYSTEM}=="block", ENV{SLOT_NUM}=="?*", ENV{SLOT_NAME}=="?*", ENV{DISK_HANDLED_BY_UBM}="1"

KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{SLOT_NAME}=="?*", SYMLINK+="disk/by-vdev/$env{SLOT_NAME}", SYMLINK+="$env{SLOT_NAME}"
KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{SLOT_NUM}=="?*", SYMLINK+="disk/by-slot-number/$env{SLOT_NUM}"
Expand Down

0 comments on commit 50c80ca

Please sign in to comment.