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

Diff of /eclass/cron.eclass

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

Revision 1.1 Revision 1.2
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.1 2005/01/15 12:37:53 ka0ttic Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cron.eclass,v 1.2 2005/01/26 16:19:49 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
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
140# dopamd [ file ] [ new file ]
141#
142# Install pam auth config file in /etc/pam.d
143#
144# NOTE: this would make much more sense as a portage script (eg. doenvd)
145#
146# The first argument, 'file' is required. Install as 'new file', if
147# specified.
148
149dopamd() {
150 local pamd="${1}" newpamd="${2:-${1}}"
151 [[ -z "${1}" ]] && die "dopamd requires at least one argument."
152
153 insinto /etc/pam.d
154 # these are the default doins options, but be explicit just in case
155 insopts -m 0644 -o root -g root
156 newins ${pamd} ${newpamd} || die "failed to install ${newpamd}"
157}
158
159cron-pkg_postinst() { 140cron-pkg_postinst() {
160 echo 141 echo
161 # vixie is the only daemon that has a true system crontab 142 # vixie is the only daemon that has a true system crontab
162 if [[ "${PN}" != "vixie-cron" ]] ; then 143 if [[ "${PN}" != "vixie-cron" ]] ; then
163 einfo "To activate /etc/cron.{hourly|daily|weekly|monthly} please run:" 144 einfo "To activate /etc/cron.{hourly|daily|weekly|monthly} please run:"

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20