aboutsummaryrefslogtreecommitdiffstats
path: root/etc/udev/rules.d/60-zpool.rules.in
diff options
context:
space:
mode:
Diffstat (limited to 'etc/udev/rules.d/60-zpool.rules.in')
-rw-r--r--etc/udev/rules.d/60-zpool.rules.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/udev/rules.d/60-zpool.rules.in b/etc/udev/rules.d/60-zpool.rules.in
new file mode 100644
index 000000000..f06be6a21
--- /dev/null
+++ b/etc/udev/rules.d/60-zpool.rules.in
@@ -0,0 +1,8 @@
+#
+# /etc/udev/rules.d/99-zpool.rules
+#
+
+ENV{DEVTYPE}=="disk", IMPORT{program}="@prefix@/bin/zpool_id -d %p"
+
+KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_ZPOOL}=="?*", SYMLINK+="$env{ID_ZPOOL_PATH}"
+KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_ZPOOL}=="?*", SYMLINK+="$env{ID_ZPOOL_PATH}-part%n"