Skip to content

Commit

Permalink
55-scsi-sg3_id.rules: compat support for ID_TARGET_PORT
Browse files Browse the repository at this point in the history
scsi_id sets ID_TARGET_PORT=%x.
  • Loading branch information
mwilck committed Jan 26, 2018
1 parent 8be170d commit 8b375d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/55-scsi-sg3_id.rules
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ 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}"
Expand Down

0 comments on commit 8b375d8

Please sign in to comment.