]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: create disk/by-diskseq symlink only when the device has diskseq
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 10 Apr 2022 16:42:59 +0000 (01:42 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Apr 2022 14:09:47 +0000 (23:09 +0900)
Follow-up for 0d08db7f89ee665a9dcb6dd66c1f9e203192e8ec.

rules.d/60-persistent-storage.rules

index 23f43e4f976b02300b8953660b095cfed0c2ccd3..4eb911b37cc476d662644ae4b5b201b63cff832d 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", SYMLINK+="disk/by-diskseq/$env{DISKSEQ}"
+ENV{DISKSEQ}=="?*", ENV{DEVTYPE}!="partition", ENV{DISKSEQ}=="?*", SYMLINK+="disk/by-diskseq/$env{DISKSEQ}"
 
 LABEL="persistent_storage_end"