commit:     e0b5d87f903b7c55b3d1f37c93ec0fa09c7fe937
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 05:35:42 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 05:35:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0b5d87f

app-forensics/chkrootkit: fix systemd notice

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-forensics/chkrootkit/chkrootkit-0.55-r1.ebuild | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/app-forensics/chkrootkit/chkrootkit-0.55-r1.ebuild 
b/app-forensics/chkrootkit/chkrootkit-0.55-r1.ebuild
index 03cfffb6ef30..0bfac68e7a96 100644
--- a/app-forensics/chkrootkit/chkrootkit-0.55-r1.ebuild
+++ b/app-forensics/chkrootkit/chkrootkit-0.55-r1.ebuild
@@ -15,11 +15,9 @@ SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${GENTOO_PATC
 LICENSE="BSD-2"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="+cron systemd"
+IUSE="+cron"
 
-DEPEND="systemd? ( sys-apps/systemd )"
-RDEPEND="${DEPEND}
-       cron? ( virtual/cron )"
+RDEPEND="cron? ( virtual/cron )"
 
 PATCHES=(
        "${WORKDIR}/${GENTOO_PATCH}"
@@ -29,6 +27,7 @@ PATCHES=(
 
 src_prepare() {
        default
+
        sed -e 's:/var/adm/:/var/log/:g' \
                -i chklastlog.c || die
 }
@@ -45,21 +44,24 @@ src_install() {
                exeinto /etc/cron.weekly
                newexe "${FILESDIR}"/${PN}.cron ${PN}
        fi
+
        systemd_dounit "${FILESDIR}/${PN}.timer" "${FILESDIR}/${PN}.service"
 }
 
 pkg_postinst() {
        if use cron ; then
                elog
-               elog "Edit /etc/cron.weekly/chkrootkit to activate chkrootkit!"
+               elog "Edit ${EROOT}/etc/cron.weekly/chkrootkit to activate 
chkrootkit!"
                elog
        fi
-       if use systemd ; then
+
+       if systemd_is_booted || has_version sys-apps/systemd ; then
                elog
                elog "To enable the systemd timer, run the following command:"
                elog "   systemctl enable --now chkrootkit.timer"
                elog
        fi
+
        elog
        elog "Some applications, such as portsentry, will cause chkrootkit"
        elog "to produce false positives.  Read the chkrootkit FAQ at"

Reply via email to