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

Diff of /eclass/eutils.eclass

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

Revision 1.252 Revision 1.255
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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.252 2006/10/05 00:12:07 nyhm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.255 2006/10/24 17:27:31 wolf31o2 Exp $
4# 4#
5# This eclass is for general purpose functions that most ebuilds 5# This eclass is for general purpose functions that most ebuilds
6# have to implement themselves. 6# have to implement themselves.
7# 7#
8# NB: If you add anything, please comment it! 8# NB: If you add anything, please comment it!
501 for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do 501 for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do
502 [[ -x ${ROOT}${shell} ]] && break 502 [[ -x ${ROOT}${shell} ]] && break
503 done 503 done
504 504
505 if [[ ${shell} == "/dev/null" ]] ; then 505 if [[ ${shell} == "/dev/null" ]] ; then
506 eerror "Unable to identify the shell to use" 506 eerror "Unable to identify the shell to use, proceeding with userland default."
507 die "Unable to identify the shell to use" 507 case ${USERLAND} in
508 GNU) shell="/bin/false" ;;
509 BSD) shell="/sbin/nologin" ;;
510 Darwin) shell="/usr/sbin/nologin" ;;
511 *) die "Unable to identify the default shell for userland ${USERLAND}"
512 esac
508 fi 513 fi
509 514
510 eshell=${shell} 515 eshell=${shell}
511 fi 516 fi
512 einfo " - Shell: ${eshell}" 517 einfo " - Shell: ${eshell}"
917 ) 922 )
918} 923}
919 924
920# Make a GDM/KDM Session file 925# Make a GDM/KDM Session file
921# 926#
922# make_desktop_entry(<title>, <command>) 927# make_session_desktop(<title>, <command>)
923# title: File to execute to start the Window Manager 928# title: File to execute to start the Window Manager
924# command: Name of the Window Manager 929# command: Name of the Window Manager
925 930
926make_session_desktop() { 931make_session_desktop() {
927 [[ -z $1 ]] && eerror "make_session_desktop: You must specify the title" && return 1 932 [[ -z $1 ]] && eerror "make_session_desktop: You must specify the title" && return 1
1205 # accepted ... if we don't find a match, we make the user accept 1210 # accepted ... if we don't find a match, we make the user accept
1206 local shopts=$- 1211 local shopts=$-
1207 local alic 1212 local alic
1208 set -o noglob #so that bash doesn't expand "*" 1213 set -o noglob #so that bash doesn't expand "*"
1209 for alic in ${ACCEPT_LICENSE} ; do 1214 for alic in ${ACCEPT_LICENSE} ; do
1210 if [[ ${alic} == * || ${alic} == ${l} ]]; then 1215 if [[ ${alic} == ${l} ]]; then
1211 set +o noglob; set -${shopts} #reset old shell opts 1216 set +o noglob; set -${shopts} #reset old shell opts
1212 return 0 1217 return 0
1213 fi 1218 fi
1214 done 1219 done
1215 set +o noglob; set -$shopts #reset old shell opts 1220 set +o noglob; set -$shopts #reset old shell opts

Legend:
Removed from v.1.252  
changed lines
  Added in v.1.255

  ViewVC Help
Powered by ViewVC 1.1.20