diff options
author | Kyle Fuller <[email protected]> | 2011-08-06 18:28:16 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-08-19 16:26:13 -0700 |
commit | 146cde8f4acd52d258ba80817dd1134702a91954 (patch) | |
tree | 7dbd1a5844e75616d3ff9477a1217c957d209d12 /udev | |
parent | 9c4f40b894dd5b5c2ef18546d23d7e91095ac509 (diff) |
Move 90-zfs udev rule from dracut to udev/rules.d
This rule does not need to be dracut specific. Automatically loading
the zfs module stack when a zfs device is detected is usually desirable.
My only concern is that this might cause trouble for large pools where
we don't want to automatically import the pool until all the disks are
available. However, we'll cross that bridge when we come to it.
Signed-off-by: Brian Behlendorf <[email protected]>
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) |