1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="base for all cron ebuilds"
8 HOMEPAGE="http://www.gentoo.org/"
12 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
17 enewuser cron 16 -1 /var/spool/cron cron
21 newsbin "${FILESDIR}"/run-crons-${PV} run-crons || die
23 diropts -m0750; keepdir /etc/cron.hourly
24 diropts -m0750; keepdir /etc/cron.daily
25 diropts -m0750; keepdir /etc/cron.weekly
26 diropts -m0750; keepdir /etc/cron.monthly
28 diropts -m0750 -o root -g cron; keepdir /var/spool/cron
30 diropts -m0750; keepdir /var/spool/cron/lastrun
34 #Portage doesn't enforce proper permissions on already existing"
35 #directories (bug 141619).
37 elog "Forcing proper permissions on"
38 elog "${ROOT}etc/cron.{hourly,daily,weekly,monthly},"
39 elog "${ROOT}var/spool/cron/ and ${ROOT}var/spool/cron/lastrun/"
41 chmod 0750 "${ROOT}"etc/cron.{hourly,daily,weekly,monthly} \
43 chmod 0750 "${ROOT}"var/spool/{cron,cron/lastrun} || die "chmod failed"
44 chown root:cron "${ROOT}var/spool/cron" || die "chown failed"