From: Kyle Fuller Date: Sat, 6 Aug 2011 17:28:16 +0000 (+0100) Subject: Move 90-zfs udev rule from dracut to udev/rules.d X-Git-Tag: zfs-0.6.0-rc6~22^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=146cde8f4acd52d258ba80817dd1134702a91954;p=zfs 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 --- diff --git a/dracut/90zfs/Makefile.am b/dracut/90zfs/Makefile.am index 605654c23..44aaf61b2 100644 --- a/dracut/90zfs/Makefile.am +++ b/dracut/90zfs/Makefile.am @@ -1,6 +1,5 @@ pkgdracutdir = $(datadir)/dracut/modules.d/90zfs dist_pkgdracut_SCRIPTS = \ - $(top_srcdir)/dracut/90zfs/90-zfs.rules \ $(top_srcdir)/dracut/90zfs/module-setup.sh \ $(top_srcdir)/dracut/90zfs/mount-zfs.sh \ $(top_srcdir)/dracut/90zfs/parse-zfs.sh diff --git a/dracut/90zfs/Makefile.in b/dracut/90zfs/Makefile.in index b63595be0..009313047 100644 --- a/dracut/90zfs/Makefile.in +++ b/dracut/90zfs/Makefile.in @@ -293,7 +293,6 @@ udevdir = @udevdir@ udevruledir = @udevruledir@ pkgdracutdir = $(datadir)/dracut/modules.d/90zfs dist_pkgdracut_SCRIPTS = \ - $(top_srcdir)/dracut/90zfs/90-zfs.rules \ $(top_srcdir)/dracut/90zfs/module-setup.sh \ $(top_srcdir)/dracut/90zfs/mount-zfs.sh \ $(top_srcdir)/dracut/90zfs/parse-zfs.sh diff --git a/dracut/90zfs/module-setup.sh b/dracut/90zfs/module-setup.sh index 822f89988..23735e31e 100755 --- a/dracut/90zfs/module-setup.sh +++ b/dracut/90zfs/module-setup.sh @@ -28,7 +28,7 @@ installkernel() { } install() { - inst_rules "$moddir/90-zfs.rules" + inst_rules /lib/udev/rules.d/90-zfs.rules inst_rules /lib/udev/rules.d/60-zpool.rules inst_rules /lib/udev/rules.d/60-zvol.rules inst /etc/zfs/zdev.conf 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/dracut/90zfs/90-zfs.rules b/udev/rules.d/90-zfs.rules.in similarity index 100% rename from dracut/90zfs/90-zfs.rules rename to udev/rules.d/90-zfs.rules.in 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' '$@.in' >'$@' + -$(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' \ + '$@.in' >'$@' 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' '$@.in' >'$@' + -$(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' \ + '$@.in' >'$@' distclean-local:: -$(RM) $(udevrule_DATA) diff --git a/zfs.spec.in b/zfs.spec.in index 56e8c4764..3f3142a16 100644 --- a/zfs.spec.in +++ b/zfs.spec.in @@ -82,7 +82,6 @@ rm -rf $RPM_BUILD_ROOT %{_sysconfdir}/init.d/* %{_sysconfdir}/zfs/* %{_udevdir}/* -%{_udevdir}/rules.d/* %files devel %defattr(-,root,root)