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 <behlendorf1@llnl.gov>
This commit is contained in:
Kyle Fuller 2011-08-06 18:28:16 +01:00 committed by Brian Behlendorf
parent 9c4f40b894
commit 146cde8f4a
8 changed files with 26 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,2 +1,3 @@
60-zpool.rules
60-zvol.rules
90-zfs.rules

View File

@ -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)

View File

@ -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)

View File

@ -82,7 +82,6 @@ rm -rf $RPM_BUILD_ROOT
%{_sysconfdir}/init.d/*
%{_sysconfdir}/zfs/*
%{_udevdir}/*
%{_udevdir}/rules.d/*
%files devel
%defattr(-,root,root)