Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 257945
Collapse All | Expand All

(-)/Library/Gentoo/usr/portage/eclass/eutils.eclass (-1 / +18 lines)
Lines 389-398 Link Here
389
# usata@gentoo.org (OS X)
389
# usata@gentoo.org (OS X)
390
# Aaron Walker <ka0ttic@gentoo.org> (FreeBSD)
390
# Aaron Walker <ka0ttic@gentoo.org> (FreeBSD)
391
# @DESCRIPTION:
391
# @DESCRIPTION:
392
# Small wrapper for getent (Linux), nidump (Mac OS X),
392
# Small wrapper for getent (Linux),
393
# nidump (< Mac OS X 10.5), dscl (Mac OS X 10.5),
393
# and pw (FreeBSD) used in enewuser()/enewgroup()
394
# and pw (FreeBSD) used in enewuser()/enewgroup()
394
egetent() {
395
egetent() {
396
ewarn "CHOST: ${CHOST}"
395
	case ${CHOST} in
397
	case ${CHOST} in
398
	*-darwin9)
399
		local mytype=$1
400
		[[ "passwd" == $mytype ]] && mytype="Users"
401
		[[ "group" == $mytype ]] && mytype="Groups"
402
		case "$2" in
403
		*[!0-9]*) # Non numeric
404
			dscl . -read /$mytype/$2 2>/dev/null |grep RecordName
405
			;;
406
		*)	# Numeric
407
			local mykey="UniqueID"
408
			[[ $mytype == "Groups" ]] && mykey="PrimaryGroupID"
409
			dscl . -search /$mytype $mykey $2 2>/dev/null
410
			;;
411
		esac
412
		;;
396
	*-darwin*)
413
	*-darwin*)
397
		case "$2" in
414
		case "$2" in
398
		*[!0-9]*) # Non numeric
415
		*[!0-9]*) # Non numeric

Return to bug 257945