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

Diff of /eclass/user.eclass

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

Revision 1.5 Revision 1.6
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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/user.eclass,v 1.5 2011/11/03 00:24:19 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.6 2011/11/03 00:26:17 vapier Exp $
4 4
5# @ECLASS: user.eclass 5# @ECLASS: user.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org (Linux) 7# base-system@gentoo.org (Linux)
8# Joe Jezak <josejx@gmail.com> (OS X) 8# Joe Jezak <josejx@gmail.com> (OS X)
402 groupadd -r ${opts} ${egroup} || die "enewgroup failed" 402 groupadd -r ${opts} ${egroup} || die "enewgroup failed"
403 ;; 403 ;;
404 esac 404 esac
405 export SANDBOX_ON="${oldsandbox}" 405 export SANDBOX_ON="${oldsandbox}"
406} 406}
407
408# @FUNCTION: egethome
409# @USAGE: <user>
410# @DESCRIPTION:
411# Gets the home directory for the specified user.
412egethome() {
413 local pos
414
415 case ${CHOST} in
416 *-darwin*|*-freebsd*|*-dragonfly*)
417 pos=9
418 ;;
419 *) # Linux, NetBSD, OpenBSD, etc...
420 pos=6
421 ;;
422 esac
423
424 egetent passwd $1 | cut -d: -f${pos}
425}

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20