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

Diff of /eclass/eutils.eclass

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

Revision 1.205 Revision 1.206
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.205 2005/10/07 15:31:46 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.206 2005/10/07 16:21:48 flameeyes Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
429 if [[ $2 == [[:digit:]]* ]] ; then 429 if [[ $2 == [[:digit:]]* ]] ; then
430 [[ ${action} == "user" ]] && opts="-u" || opts="-g" 430 [[ ${action} == "user" ]] && opts="-u" || opts="-g"
431 fi 431 fi
432 432
433 pw show ${action} ${opts} "$2" -q 433 pw show ${action} ${opts} "$2" -q
434 ;;
435 *-netbsd*)
436 grep "$2:\*:" /etc/$1
434 ;; 437 ;;
435 *) 438 *)
436 type -p nscd >& /dev/null && nscd -i "$1" 439 type -p nscd >& /dev/null && nscd -i "$1"
437 getent "$1" "$2" 440 getent "$1" "$2"
438 ;; 441 ;;
699 [ -z "`egetent group ${egid}`" ] && break 702 [ -z "`egetent group ${egid}`" ] && break
700 done 703 done
701 esac 704 esac
702 pw groupadd ${egroup} -g ${egid} || die "enewgroup failed" 705 pw groupadd ${egroup} -g ${egid} || die "enewgroup failed"
703 ;; 706 ;;
707
708 *-netbsd*)
709 case ${egid} in
710 *[!0-9]*) # Non numeric
711 for egid in $(seq 101 999); do
712 [ -z "`egetent group ${egid}`" ] && break
713 done
714 esac
715 groupadd ${egroup} -g ${egid} || die "enewgroup failed"
716 ;;
717
704 *) 718 *)
705 groupadd ${opts} ${egroup} || die "enewgroup failed" 719 groupadd ${opts} ${egroup} || die "enewgroup failed"
706 ;; 720 ;;
707 esac 721 esac
708 export SANDBOX_ON="${oldsandbox}" 722 export SANDBOX_ON="${oldsandbox}"

Legend:
Removed from v.1.205  
changed lines
  Added in v.1.206

  ViewVC Help
Powered by ViewVC 1.1.20