]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: create /dev/disk/by-label symlink for LUKS2 (#8998)
authorMilan Broz <gmazyland@gmail.com>
Tue, 15 May 2018 14:51:07 +0000 (16:51 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 15 May 2018 14:51:07 +0000 (16:51 +0200)
LUKS2 header supports to device label and blkid since 2.32 version
already supports this option.

Persistent udev storage rules should create symlink for this label.

For older devices this value is not set so changed rule should be compatible.

rules/60-persistent-storage.rules

index 0de8cf3a1a404804358496e851523b89c8b6bfe0..8ddb7577c1e63fff164f86db810d906a27d7c542 100644 (file)
@@ -91,7 +91,7 @@ KERNEL!="sr*", IMPORT{builtin}="blkid"
 
 # 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", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
 
 # by-id (World Wide Name)
 ENV{DEVTYPE}=="disk", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}"