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

Diff of /eclass/user.eclass

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

Revision 1.11 Revision 1.12
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.11 2011/11/26 06:42:07 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.12 2011/11/26 06:45:38 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)
220 set -- -c "added by portage for ${PN}" 220 set -- -c "added by portage for ${PN}"
221 einfo " - Extra: $@" 221 einfo " - Extra: $@"
222 fi 222 fi
223 223
224 # add the user 224 # add the user
225 local oldsandbox=${SANDBOX_ON}
226 export SANDBOX_ON="0"
227 case ${CHOST} in 225 case ${CHOST} in
228 *-darwin*) 226 *-darwin*)
229 ### Make the user 227 ### Make the user
230 dscl . create /users/${euser} uid ${euid} 228 dscl . create /users/${euser} uid ${euid}
231 dscl . create /users/${euser} shell ${eshell} 229 dscl . create /users/${euser} shell ${eshell}
263 einfo " - Creating ${ehome} in ${ROOT}" 261 einfo " - Creating ${ehome} in ${ROOT}"
264 mkdir -p "${ROOT}/${ehome}" 262 mkdir -p "${ROOT}/${ehome}"
265 chown ${euser} "${ROOT}/${ehome}" 263 chown ${euser} "${ROOT}/${ehome}"
266 chmod 755 "${ROOT}/${ehome}" 264 chmod 755 "${ROOT}/${ehome}"
267 fi 265 fi
268
269 export SANDBOX_ON=${oldsandbox}
270} 266}
271 267
272# @FUNCTION: enewgroup 268# @FUNCTION: enewgroup
273# @USAGE: <group> [gid] 269# @USAGE: <group> [gid]
274# @DESCRIPTION: 270# @DESCRIPTION:
325 if [ $# -gt 0 ] ; then 321 if [ $# -gt 0 ] ; then
326 die "extra arguments no longer supported; please file a bug" 322 die "extra arguments no longer supported; please file a bug"
327 fi 323 fi
328 324
329 # add the group 325 # add the group
330 local oldsandbox="${SANDBOX_ON}"
331 export SANDBOX_ON="0"
332 case ${CHOST} in 326 case ${CHOST} in
333 *-darwin*) 327 *-darwin*)
334 # If we need the next available 328 # If we need the next available
335 case ${egid} in 329 case ${egid} in
336 *[!0-9]*) # Non numeric 330 *[!0-9]*) # Non numeric
365 *) 359 *)
366 # We specify -r so that we get a GID in the system range from login.defs 360 # We specify -r so that we get a GID in the system range from login.defs
367 groupadd -r ${opts} ${egroup} || die 361 groupadd -r ${opts} ${egroup} || die
368 ;; 362 ;;
369 esac 363 esac
370 export SANDBOX_ON="${oldsandbox}"
371} 364}
372 365
373# @FUNCTION: egethome 366# @FUNCTION: egethome
374# @USAGE: <user> 367# @USAGE: <user>
375# @DESCRIPTION: 368# @DESCRIPTION:

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20