/[gentoo-x86]/eclass/cron.eclass
Gentoo

Diff of /eclass/cron.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/cron.eclass,v 1.3 2005/03/04 23:25:25 ciaranm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cron.eclass,v 1.4 2005/03/16 10:51:16 ka0ttic Exp $
4 4
5# Original Author: Aaron Walker <ka0ttic@gentoo.org> 5# Original Author: Aaron Walker <ka0ttic@gentoo.org>
6# 6#
7# Purpose: The main motivation for this eclass was to simplify 7# Purpose: The main motivation for this eclass was to simplify
8# the jungle known as src_install() in cron ebuilds. Using these 8# the jungle known as src_install() in cron ebuilds. Using these
45# docrondir -m0700 (uses default dir) 45# docrondir -m0700 (uses default dir)
46 46
47docrondir() { 47docrondir() {
48 # defaults 48 # defaults
49 local perms="-m0750 -o root -g cron" dir="/var/spool/cron/crontabs" 49 local perms="-m0750 -o root -g cron" dir="/var/spool/cron/crontabs"
50 50
51 if [[ -n "$1" ]] ; then 51 if [[ -n "$1" ]] ; then
52 case "$1" in 52 case "$1" in
53 */*) 53 */*)
54 dir="$1" 54 dir="$1"
55 shift 55 shift
135 dosym ${crontab##*/} /usr/bin/crontab || \ 135 dosym ${crontab##*/} /usr/bin/crontab || \
136 die "failed to create /usr/bin/crontab symlink" 136 die "failed to create /usr/bin/crontab symlink"
137 fi 137 fi
138} 138}
139 139
140cron-pkg_postinst() { 140cron_pkg_postinst() {
141 echo 141 echo
142 # vixie is the only daemon that has a true system crontab 142 # vixie is the only daemon that has a true system crontab
143 if [[ "${PN}" != "vixie-cron" ]] ; then 143 if [[ "${PN}" != "vixie-cron" ]] ; then
144 einfo "To activate /etc/cron.{hourly|daily|weekly|monthly} please run:" 144 einfo "To activate /etc/cron.{hourly|daily|weekly|monthly} please run:"
145 einfo " crontab /etc/crontab" 145 einfo " crontab /etc/crontab"
146 einfo 146 einfo
147 einfo "!!! That will replace root's current crontab !!!" 147 einfo "!!! That will replace root's current crontab !!!"
148 einfo 148 einfo
149 fi 149 fi
150 150
151 einfo "You may wish to read the Gentoo Linux Cron Guide, which can be" 151 einfo "You may wish to read the Gentoo Linux Cron Guide, which can be"
152 einfo "found online at:" 152 einfo "found online at:"
153 einfo " http://www.gentoo.org/doc/en/cron-guide.xml" 153 einfo " http://www.gentoo.org/doc/en/cron-guide.xml"
154 echo 154 echo
155} 155}

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20