sys-fs/zfs: fix systemd units for kernel-builtin
authorMatthew Thode <prometheanfire@gentoo.org>
Sat, 7 May 2016 01:55:12 +0000 (20:55 -0500)
committerMatthew Thode <prometheanfire@gentoo.org>
Sat, 7 May 2016 01:55:12 +0000 (20:55 -0500)
Package-Manager: portage-2.2.26

sys-fs/zfs/zfs-9999.ebuild

index 11f06374510595876687f87d8f34d2fa207c89d9..6f514eb5d1c4fc554927977793668ee8873e515f 100644 (file)
@@ -88,6 +88,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
 }
 
@@ -115,6 +121,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() {