diff --git a/dracut/90zfs/Makefile.am b/dracut/90zfs/Makefile.am index 605654c233..44aaf61b21 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 b63595be08..0093130475 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 822f89988e..23735e31e0 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 e56d65ef8e..939962d478 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 41740517eb..bb4eedfe9c 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 06ef0a970c..a91f67edc8 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 56e8c47645..3f3142a16b 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)