commit:     c756381a157ee8c3de2924685791d962eeb3d341
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 14 20:38:27 2018 +0000
Commit:     Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Wed Feb 14 20:39:11 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c756381a

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

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 sys-fs/zfs/files/zfs.service.in |  2 +-
 sys-fs/zfs/zfs-9999.ebuild      | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/sys-fs/zfs/files/zfs.service.in b/sys-fs/zfs/files/zfs.service.in
index c390a480708..ae2eff170a7 100644
--- a/sys-fs/zfs/files/zfs.service.in
+++ b/sys-fs/zfs/files/zfs.service.in
@@ -6,7 +6,7 @@ After=systemd-udev-settle.target local-fs.target
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStartPre=/sbin/modprobe zfs
+ExecStartPre=-/sbin/modprobe zfs
 ExecStartPre=/usr/bin/test -c /dev/zfs
 ExecStart=/usr/libexec/zfs-init.sh
 ExecStop=@sbindir@/zfs umount -a

diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index 7b8d2f94a45..5cfa93fa4c5 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-9999.ebuild
@@ -87,12 +87,6 @@ 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
 }
 
@@ -120,10 +114,6 @@ 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