From 61f10f985e19dfe20a4d9552902625edd5b6eabb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 21 Jun 2021 17:32:00 +0100 Subject: gentoo resync : 21.06.2021 --- eclass/cron.eclass | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'eclass/cron.eclass') diff --git a/eclass/cron.eclass b/eclass/cron.eclass index 5548b190f9a7..81f963a4f722 100644 --- a/eclass/cron.eclass +++ b/eclass/cron.eclass @@ -6,6 +6,7 @@ # maintainer-needed@gentoo.org # @AUTHOR: # Original Author: Aaron Walker +# @SUPPORTED_EAPIS: 6 7 # @BLURB: Some functions for cron # @DESCRIPTION: # Purpose: The main motivation for this eclass was to simplify @@ -15,15 +16,20 @@ # # NOTE on defaults: the default settings in the below functions were # chosen based on the most common setting among cron ebuilds. -# -inherit eutils flag-o-matic +case ${EAPI} in + [67]) inherit eutils ;; + *) die "EAPI=${EAPI:-0} is not supported" ;; +esac + +inherit flag-o-matic EXPORT_FUNCTIONS pkg_postinst -SLOT="0" +if [[ -z ${_CRON_ECLASS} ]]; then +_CRON_ECLASS=1 -DEPEND=">=sys-apps/sed-4.0.5" +SLOT="0" RDEPEND=">=sys-process/cronbase-0.3.2" for pn in vixie-cron bcron cronie dcron fcron; do @@ -41,7 +47,6 @@ done # ex: docrondir /some/dir -m 0770 -o root -g cron # docrondir /some/dir (uses default perms) # docrondir -m0700 (uses default dir) - docrondir() { # defaults local perms="-m0750 -o root -g cron" dir="/var/spool/cron/crontabs" @@ -75,7 +80,6 @@ docrondir() { # # ex: docron -m 0700 -o root -g root ('exe' defaults to "cron") # docron crond -m 0110 - docron() { local cron="cron" perms="-m 0750 -o root -g wheel" @@ -106,7 +110,6 @@ docron() { # Install crontab executable # # Uses same semantics as docron. - docrontab() { local crontab="crontab" perms="-m 4750 -o root -g cron" @@ -157,3 +160,5 @@ cron_pkg_postinst() { einfo " https://wiki.gentoo.org/wiki/Cron" echo } + +fi -- cgit v1.2.3