]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: do not create disk/by-diskseq symlink when ID_IGNORE_DISKSEQ property is set
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Apr 2022 14:04:47 +0000 (23:04 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Apr 2022 15:11:57 +0000 (00:11 +0900)
rules.d/60-persistent-storage.rules

index 4eb911b37cc476d662644ae4b5b201b63cff832d..de0842820720ae10f54f15c66ab8c9f3367f1633 100644 (file)
@@ -124,6 +124,6 @@ ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="disk/
 # by-diskseq link (if an app is told to open a path like this, they may parse
 # the diskseq number from the path, then issue BLKGETDISKSEQ to verify they really got
 # the right device, to access specific disks in a race-free fashion)
-ENV{DISKSEQ}=="?*", ENV{DEVTYPE}!="partition", ENV{DISKSEQ}=="?*", SYMLINK+="disk/by-diskseq/$env{DISKSEQ}"
+ENV{DISKSEQ}=="?*", ENV{DEVTYPE}!="partition", ENV{DISKSEQ}=="?*", ENV{ID_IGNORE_DISKSEQ}!="1", SYMLINK+="disk/by-diskseq/$env{DISKSEQ}"
 
 LABEL="persistent_storage_end"