summaryrefslogtreecommitdiffstats
path: root/udev/01-memdisk.rules
diff options
context:
space:
mode:
Diffstat (limited to 'udev/01-memdisk.rules')
-rw-r--r--udev/01-memdisk.rules11
1 files changed, 11 insertions, 0 deletions
diff --git a/udev/01-memdisk.rules b/udev/01-memdisk.rules
new file mode 100644
index 0000000..0a8fd7b
--- /dev/null
+++ b/udev/01-memdisk.rules
@@ -0,0 +1,11 @@
+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{builtin}="blkid"
+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"