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

Diff of /eclass/eutils.eclass

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

Revision 1.150 Revision 1.151
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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/eutils.eclass,v 1.150 2005/02/08 10:59:46 eradicator Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.151 2005/02/11 22:56:51 vapier Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
1647 patch -p0 "${f}" "${PORTDIR}/eclass/ELT-patches/nocxx/nocxx.patch" > /dev/null 1647 patch -p0 "${f}" "${PORTDIR}/eclass/ELT-patches/nocxx/nocxx.patch" > /dev/null
1648 done 1648 done
1649 eend 0 1649 eend 0
1650} 1650}
1651 1651
1652# dopamd [ file ] [ new file ] 1652# dopamd <file> [more files]
1653# 1653#
1654# Install pam auth config file in /etc/pam.d 1654# Install pam auth config file in /etc/pam.d
1655#
1656# The first argument, 'file' is required. Install as 'new file', if
1657# specified.
1658
1659dopamd() { 1655dopamd() {
1660 local pamd="$1" newpamd="${2:-$1}"
1661 [[ -z "$1" ]] && die "dopamd requires at least one argument." 1656 [[ -z $1 ]] && die "dopamd requires at least one argument"
1662 1657
1663 use pam || return 0 1658 use pam || return 0
1664 1659
1665 insinto /etc/pam.d 1660 insinto /etc/pam.d
1666 # these are the default doins options, but be explicit just in case 1661 # these are the default doins options, but be explicit just in case
1667 insopts -m 0644 -o root -g root 1662 insopts -m 0644 -o root -g root
1668 newins ${pamd} ${newpamd} || die "failed to install ${newpamd}" 1663 doins "$@" || die "failed to install $@"
1669} 1664}
1665# newpamd <old name> <new name>
1666#
1667# Install pam file <old name> as <new name> in /etc/pam.d
1668newpamd() {
1669 [[ $# -ne 2 ]] && die "newpamd requires two arguements"
1670
1671 use pam || return 0
1672
1673 insinto /etc/pam.d
1674 # these are the default doins options, but be explicit just in case
1675 insopts -m 0644 -o root -g root
1676 newins "$1" "$2" || die "failed to install $1 as $2"
1677}

Legend:
Removed from v.1.150  
changed lines
  Added in v.1.151

  ViewVC Help
Powered by ViewVC 1.1.20