| 1 | # Copyright 2004 Gentoo Foundation |
1 | # Copyright 2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License, v2 or later |
2 | # Distributed under the terms of the GNU General Public License, v2 or later |
| 3 | # Author Diego Pettenò <flameeyes@gentoo.org> |
3 | # Author Diego Pettenò <flameeyes@gentoo.org> |
| 4 | # $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.15 2008/02/20 00:00:01 flameeyes Exp $ |
4 | # $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.16 2008/03/20 23:21:37 eva Exp $ |
| 5 | # |
5 | # |
| 6 | # This eclass contains functions to install pamd configuration files and |
6 | # This eclass contains functions to install pamd configuration files and |
| 7 | # pam modules. |
7 | # pam modules. |
| 8 | |
8 | |
| 9 | inherit multilib |
9 | inherit multilib |
| … | |
… | |
| 174 | # Cleans a pam.d file from modules that might not be present on the system |
174 | # Cleans a pam.d file from modules that might not be present on the system |
| 175 | # where it's going to be installed |
175 | # where it's going to be installed |
| 176 | cleanpamd() { |
176 | cleanpamd() { |
| 177 | while [[ -n $1 ]]; do |
177 | while [[ -n $1 ]]; do |
| 178 | if ! has_version sys-libs/pam; then |
178 | if ! has_version sys-libs/pam; then |
| 179 | sed -i -e '/pam_shells\|pam_console/s:^:#:' ${D}/etc/pam.d/$1 |
179 | sed -i -e '/pam_shells\|pam_console/s:^:#:' "${D}/etc/pam.d/$1" |
| 180 | fi |
180 | fi |
| 181 | |
181 | |
| 182 | shift |
182 | shift |
| 183 | done |
183 | done |
| 184 | } |
184 | } |