diff options
Diffstat (limited to 'udev')
-rw-r--r-- | udev/rules.d/.gitignore | 1 | ||||
-rw-r--r-- | udev/rules.d/90-zfs.rules.in | 10 | ||||
-rw-r--r-- | udev/rules.d/Makefile.am | 18 | ||||
-rw-r--r-- | udev/rules.d/Makefile.in | 17 |
4 files changed, 35 insertions, 11 deletions
diff --git a/udev/rules.d/.gitignore b/udev/rules.d/.gitignore index e56d65ef8..939962d47 100644 --- a/udev/rules.d/.gitignore +++ b/udev/rules.d/.gitignore @@ -1,2 +1,3 @@ 60-zpool.rules 60-zvol.rules +90-zfs.rules diff --git a/udev/rules.d/90-zfs.rules.in b/udev/rules.d/90-zfs.rules.in new file mode 100644 index 000000000..52e1d6393 --- /dev/null +++ b/udev/rules.d/90-zfs.rules.in @@ -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" diff --git a/udev/rules.d/Makefile.am b/udev/rules.d/Makefile.am index 41740517e..bb4eedfe9 100644 --- a/udev/rules.d/Makefile.am +++ b/udev/rules.d/Makefile.am @@ -1,14 +1,20 @@ udevrule_DATA = \ - 60-zpool.rules \ - 60-zvol.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 = \ - 60-zpool.rules.in \ - 60-zvol.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 $(udevrule_DATA): - -$(SED) -e 's,@udevdir\@,$(udevdir),g' '[email protected]' >'$@' + -$(SED) -e 's,@bindir\@,$(bindir),g' \ + -e 's,@sbindir\@,$(sbindir),g' \ + -e 's,@udevdir\@,$(udevdir),g' \ + -e 's,@udevruledir\@,$(udevruledir),g' \ + -e 's,@sysconfdir\@,$(sysconfdir),g' \ + '[email protected]' >'$@' distclean-local:: -$(RM) $(udevrule_DATA) - diff --git a/udev/rules.d/Makefile.in b/udev/rules.d/Makefile.in index 06ef0a970..a91f67edc 100644 --- a/udev/rules.d/Makefile.in +++ b/udev/rules.d/Makefile.in @@ -291,12 +291,14 @@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ udevruledir = @udevruledir@ udevrule_DATA = \ - 60-zpool.rules \ - 60-zvol.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 = \ - 60-zpool.rules.in \ - 60-zvol.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 all: all-am @@ -509,7 +511,12 @@ uninstall-am: uninstall-udevruleDATA $(udevrule_DATA): - -$(SED) -e 's,@udevdir\@,$(udevdir),g' '[email protected]' >'$@' + -$(SED) -e 's,@bindir\@,$(bindir),g' \ + -e 's,@sbindir\@,$(sbindir),g' \ + -e 's,@udevdir\@,$(udevdir),g' \ + -e 's,@udevruledir\@,$(udevruledir),g' \ + -e 's,@sysconfdir\@,$(sysconfdir),g' \ + '[email protected]' >'$@' distclean-local:: -$(RM) $(udevrule_DATA) |