summaryrefslogtreecommitdiffstats
path: root/rules.d
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-08-02 16:33:14 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2023-08-02 23:03:14 +0200
commitc4521fc17bb33d10bf5aca3f87f6a394dfecf423 (patch)
tree06a646cd73146c6b2b4f60ab70f5c319ae1e7550 /rules.d
parentMerge pull request #28646 from yuwata/network-generator-ip-dhcp (diff)
downloadsystemd-c4521fc17bb33d10bf5aca3f87f6a394dfecf423.tar.xz
systemd-c4521fc17bb33d10bf5aca3f87f6a394dfecf423.zip
udev: decrease devlink priority for encrypted partitions
Decrease devlink priority for encrypted partitions, and make the priority for decrypted DM devices relatively higher. This is for the case that an encrypted partition and its decrypted DM device have the same label.
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/60-persistent-storage.rules.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/rules.d/60-persistent-storage.rules.in b/rules.d/60-persistent-storage.rules.in
index f08fc0da2f..c89d8a3e0e 100644
--- a/rules.d/60-persistent-storage.rules.in
+++ b/rules.d/60-persistent-storage.rules.in
@@ -138,6 +138,11 @@ LABEL="persistent_storage_blkid_probe_end"
# See issue #28468.
ENV{ID_FS_TYPE}=="iso9660", ENV{DEVTYPE}=="disk", OPTIONS+="link_priority=-10"
+# Decrease devlink priority for encrypted partitions, and make the priority for
+# decrypted DM devices relatively higher. This is for the case that an encrypted
+# partition and its decrypted DM device have the same label.
+ENV{ID_FS_USAGE}=="crypto", OPTIONS+="link_priority=-10"
+
# by-label/by-uuid links (filesystem metadata)
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"