diff options
author | 我超厉害 <524413304@qq.com> | 2024-01-16 06:57:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-16 06:57:07 +0100 |
commit | 8a86e15f07dd7030bfc31fb4944c24fb9a481fc5 (patch) | |
tree | bda0bda0e1cda1b4b0d756109409bb0c13a2c064 /rules.d | |
parent | Merge pull request #30851 from lnussel/kernel-install (diff) | |
download | systemd-8a86e15f07dd7030bfc31fb4944c24fb9a481fc5.tar.xz systemd-8a86e15f07dd7030bfc31fb4944c24fb9a481fc5.zip |
udev: even if a device is a zac device, scsi-$ID_SERIAL will be reserved for it (#30459)
Co-authored-by: wangyuhang <wangyuhang27@huawei.com>
Diffstat (limited to 'rules.d')
-rw-r--r-- | rules.d/60-persistent-storage.rules.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rules.d/60-persistent-storage.rules.in b/rules.d/60-persistent-storage.rules.in index 96b888fdff..390c6e0034 100644 --- a/rules.d/60-persistent-storage.rules.in +++ b/rules.d/60-persistent-storage.rules.in @@ -59,6 +59,8 @@ KERNEL=="vd*", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="di # ATA KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", IMPORT{program}="ata_id --export $devnode" +KERNEL=="sd*[!0-9]|sr*", ENV{ID_BUS}=="ata", ENV{ID_ATA_PERIPHERAL_DEVICE_TYPE}=="20", PROGRAM="scsi_id -u -g $devnode", \ + SYMLINK+="disk/by-id/scsi-$result$env{.PART_SUFFIX}" # ATAPI devices (SPC-3 or later) KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{type}=="5", ATTRS{scsi_level}=="[6-9]*", IMPORT{program}="ata_id --export $devnode" |