summaryrefslogtreecommitdiff
path: root/eclass/cron.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-21 17:32:00 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-21 17:32:00 +0100
commit61f10f985e19dfe20a4d9552902625edd5b6eabb (patch)
tree50db31971b38c4e0358253ef5005058a46fc773e /eclass/cron.eclass
parent34dea8e38f88007799629d0a56b12dec480b1d21 (diff)
gentoo resync : 21.06.2021
Diffstat (limited to 'eclass/cron.eclass')
-rw-r--r--eclass/cron.eclass19
1 files changed, 12 insertions, 7 deletions
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 <ka0ttic@gentoo.org>
+# @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