commit:     b013ca92c618cb735ec189768d70c21e8471e0d9
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 30 22:25:11 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Aug 30 22:25:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b013ca92

sys-fs/zfs: don't print openrc-specific message for systemd users

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 sys-fs/zfs/zfs-9999.ebuild | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index 1a24ecab027..7def7111301 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-9999.ebuild
@@ -207,14 +207,19 @@ pkg_postinst() {
                update_moduledb
        fi
 
-       [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
-               einfo "You should add zfs-import to the boot runlevel."
-       [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
-               einfo "You should add zfs-mount to the boot runlevel."
-       [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
-               einfo "You should add zfs-share to the default runlevel."
-       [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
-               einfo "You should add zfs-zed to the default runlevel."
+       if systemd_is_booted || has_version sys-apps/systemd; then
+               einfo "Please refer to 
${EROOT}/lib/systemd/system-preset/50-zfs.preset"
+               einfo "for default zfs systemd service configuration"
+       else
+               [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \
+                       einfo "You should add zfs-import to the boot runlevel."
+               [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \
+                       einfo "You should add zfs-mount to the boot runlevel."
+               [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \
+                       einfo "You should add zfs-share to the default 
runlevel."
+               [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
+                       einfo "You should add zfs-zed to the default runlevel."
+       fi
 }
 
 pkg_postrm() {

Reply via email to