summaryrefslogtreecommitdiffstats
path: root/udev/rules.d
diff options
context:
space:
mode:
Diffstat (limited to 'udev/rules.d')
-rw-r--r--udev/rules.d/60-vdev.rules.in9
-rw-r--r--udev/rules.d/Makefile.am2
-rw-r--r--udev/rules.d/Makefile.in2
3 files changed, 13 insertions, 0 deletions
diff --git a/udev/rules.d/60-vdev.rules.in b/udev/rules.d/60-vdev.rules.in
new file mode 100644
index 000000000..a1885d967
--- /dev/null
+++ b/udev/rules.d/60-vdev.rules.in
@@ -0,0 +1,9 @@
+#
+# /lib/udev/rules.d/60-vdev.rules
+#
+
+ENV{DEVTYPE}=="disk", IMPORT{program}="/lib/udev/vdev_id -d %k"
+
+KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}"
+KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="partition", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}-part%n"
+KERNEL=="dm-[0-9]*", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}"
diff --git a/udev/rules.d/Makefile.am b/udev/rules.d/Makefile.am
index bb4eedfe9..586d76a5e 100644
--- a/udev/rules.d/Makefile.am
+++ b/udev/rules.d/Makefile.am
@@ -1,9 +1,11 @@
udevrule_DATA = \
+ $(top_srcdir)/udev/rules.d/60-vdev.rules \
$(top_srcdir)/udev/rules.d/60-zpool.rules \
$(top_srcdir)/udev/rules.d/60-zvol.rules \
$(top_srcdir)/udev/rules.d/90-zfs.rules
EXTRA_DIST = \
+ $(top_srcdir)/udev/rules.d/60-vdev.rules.in \
$(top_srcdir)/udev/rules.d/60-zpool.rules.in \
$(top_srcdir)/udev/rules.d/60-zvol.rules.in \
$(top_srcdir)/udev/rules.d/90-zfs.rules.in
diff --git a/udev/rules.d/Makefile.in b/udev/rules.d/Makefile.in
index d016d1646..2f440e126 100644
--- a/udev/rules.d/Makefile.in
+++ b/udev/rules.d/Makefile.in
@@ -313,11 +313,13 @@ top_srcdir = @top_srcdir@
udevdir = @udevdir@
udevruledir = @udevruledir@
udevrule_DATA = \
+ $(top_srcdir)/udev/rules.d/60-vdev.rules \
$(top_srcdir)/udev/rules.d/60-zpool.rules \
$(top_srcdir)/udev/rules.d/60-zvol.rules \
$(top_srcdir)/udev/rules.d/90-zfs.rules
EXTRA_DIST = \
+ $(top_srcdir)/udev/rules.d/60-vdev.rules.in \
$(top_srcdir)/udev/rules.d/60-zpool.rules.in \
$(top_srcdir)/udev/rules.d/60-zvol.rules.in \
$(top_srcdir)/udev/rules.d/90-zfs.rules.in