feat: add by-label disk support
Signed-off-by: sisungo <[email protected]>
This commit is contained in:
@@ -15,6 +15,21 @@
|
|||||||
when: Match("FSUUID", ""),
|
when: Match("FSUUID", ""),
|
||||||
do: [Unset("FSUUID")],
|
do: [Unset("FSUUID")],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
when: All([
|
||||||
|
Match("ACTION", "add"),
|
||||||
|
Match("SUBSYSTEM", "block"),
|
||||||
|
Match("DEVNODE", ".*"),
|
||||||
|
]),
|
||||||
|
do: [
|
||||||
|
UseProvider("FSLABEL", f("blkid -o value -s LABEL {DEVNODE}")),
|
||||||
|
],
|
||||||
|
on_error: Continue,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
when: Match("FSLABEL", ""),
|
||||||
|
do: [Unset("FSLABEL")],
|
||||||
|
),
|
||||||
|
|
||||||
// Create link aliases for block devices
|
// Create link aliases for block devices
|
||||||
(
|
(
|
||||||
@@ -42,6 +57,14 @@
|
|||||||
]),
|
]),
|
||||||
do: [Add("SYMLINKS", f("{DEVROOT}/disk/by-uuid/{FSUUID}"))],
|
do: [Add("SYMLINKS", f("{DEVROOT}/disk/by-uuid/{FSUUID}"))],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
when: All([
|
||||||
|
Match("ACTION", "add"),
|
||||||
|
Match("SUBSYSTEM", "block"),
|
||||||
|
Match("FSLABEL", ".+"),
|
||||||
|
]),
|
||||||
|
do: [Add("SYMLINKS", f("{DEVROOT}/disk/by-label/{FSLABEL}"))],
|
||||||
|
),
|
||||||
(
|
(
|
||||||
when: All([
|
when: All([
|
||||||
Match("ACTION", "add"),
|
Match("ACTION", "add"),
|
||||||
|
|||||||
Reference in New Issue
Block a user