chiark / gitweb /
rules: support for gpt partition uuid/label
authorKeshav P.R <skodabenz@gmail.com>
Sat, 11 Jun 2011 11:35:53 +0000 (13:35 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 11 Jun 2011 11:41:34 +0000 (13:41 +0200)
rules/rules.d/60-persistent-storage.rules

index 05a405f..0a21d85 100644 (file)
@@ -80,4 +80,8 @@ ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk
 ENV{DEVTYPE}=="disk", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}"
 ENV{DEVTYPE}=="partition", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}-part%n"
 
+# by-partlabel/by-partuuid links (partition metadata)
+ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"
+ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="disk/by-partlabel/$env{ID_PART_ENTRY_NAME}"
+
 LABEL="persistent_storage_end"