Move 90-zfs udev rule from dracut to udev/rules.d
[zfs.git] / udev / rules.d / 90-zfs.rules.in
diff --git a/udev/rules.d/90-zfs.rules.in b/udev/rules.d/90-zfs.rules.in
new file mode 100644 (file)
index 0000000..52e1d63
--- /dev/null
@@ -0,0 +1,10 @@
+SUBSYSTEM!="block", GOTO="zfs_end"
+ACTION!="add|change", GOTO="zfs_end"
+
+ENV{ID_FS_TYPE}=="zfs", RUN+="/sbin/modprobe zfs"
+ENV{ID_FS_TYPE}=="zfs_member", RUN+="/sbin/modprobe zfs"
+
+KERNEL=="null", SYMLINK+="root"
+SYMLINK=="null", SYMLINK+="root"
+
+LABEL="zfs_end"