summaryrefslogtreecommitdiffstats
path: root/01-memdisk.rules
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-06-23 01:12:24 +0200
committerThomas Bächler <thomas@archlinux.org>2010-06-23 01:12:24 +0200
commitdb6f62039b1864935b9189745712d611ab5b9360 (patch)
treebaced0b3871eae2ba45c1c8bf2abc32f18ab045e /01-memdisk.rules
parente64bde8c514765e5f76cdff504d9a73f6945479f (diff)
downloadmkinitcpio-db6f62039b1864935b9189745712d611ab5b9360.tar.gz
mkinitcpio-db6f62039b1864935b9189745712d611ab5b9360.tar.xz
memdisk: add UUID and label symlinks to udev rule
Diffstat (limited to '01-memdisk.rules')
-rw-r--r--01-memdisk.rules12
1 files changed, 11 insertions, 1 deletions
diff --git a/01-memdisk.rules b/01-memdisk.rules
index 1d5e292..5015d7e 100644
--- a/01-memdisk.rules
+++ b/01-memdisk.rules
@@ -1 +1,11 @@
-ACTION=="add|change", SUBSYSTEM=="block", KERNEL=="mtdblock*", ATTRS{name}=="memdisk", ATTRS{type}=="ram", SYMLINK+="memdisk"
+ACTION=="add|change", SUBSYSTEM=="block", KERNEL=="mtdblock*", ATTRS{name}=="memdisk", ATTRS{type}=="ram", GOTO="memdisk_start"
+GOTO="memdisk_end"
+
+LABEL="memdisk_start"
+
+SYMLINK+="memdisk"
+IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
+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}"
+
+LABEL="memdisk_end"