commit:     17ae35d84179494da590276bdf61784e9226a5d9
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 14 21:43:23 2018 +0000
Commit:     Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Wed Feb 14 21:45:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17ae35d8

Revert "sys-fs/zfs: make modprobe optional for systemd unit files"

This reverts commit c756381a157ee8c3de2924685791d962eeb3d341.

 sys-fs/zfs/zfs-9999.ebuild | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index 5cfa93fa4c5..7b8d2f94a45 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-9999.ebuild
@@ -87,6 +87,12 @@ src_prepare() {
                -e "s|/sbin/parted|/usr/sbin/parted|" \
                -i scripts/common.sh.in
 
+       if use kernel-builtin
+       then
+               einfo "kernel-builtin enabled, removing module loading from"
+               einfo "systemd units."
+               sed -i -e '/modprobe\ zfs/d' etc/systemd/system/*.service.in || 
die
+       fi
        autotools-utils_src_prepare
 }
 
@@ -114,6 +120,10 @@ src_configure() {
                sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
                        -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
                > "${T}/zfs-init.sh" || die
+       if use kernel-builtin
+       then
+               sed -i -e '/modprobe\ zfs/d' "${T}/zfs.service" || die
+       fi
 }
 
 src_install() {

Reply via email to