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

Diff of /eclass/eutils.eclass

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

Revision 1.217 Revision 1.218
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.217 2005/11/18 03:29:38 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.218 2005/11/22 11:15:34 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.
432 [[ ${action} == "user" ]] && opts="-u" || opts="-g" 432 [[ ${action} == "user" ]] && opts="-u" || opts="-g"
433 fi 433 fi
434 434
435 pw show ${action} ${opts} "$2" -q 435 pw show ${action} ${opts} "$2" -q
436 ;; 436 ;;
437 *-netbsd*) 437 *-netbsd*|*-openbsd*)
438 grep "$2:\*:" /etc/$1 438 grep "$2:\*:" /etc/$1
439 ;; 439 ;;
440 *) 440 *)
441 type -p nscd >& /dev/null && nscd -i "$1" 441 type -p nscd >& /dev/null && nscd -i "$1"
442 getent "$1" "$2" 442 getent "$1" "$2"
600 else 600 else
601 einfo " - Extra: $@" 601 einfo " - Extra: $@"
602 useradd ${opts} ${euser} "$@" || die "enewuser failed" 602 useradd ${opts} ${euser} "$@" || die "enewuser failed"
603 fi 603 fi
604 ;; 604 ;;
605
606 *-openbsd*)
607 if [[ -z $@ ]] ; then
608 useradd -u ${euid} -s ${eshell} \
609 -d ${ehome} -c "Added by portage for ${PN}" \
610 -g ${egroups} ${euser} || die "enewuser failed"
611 else
612 einfo " - Extra: $@"
613 useradd -u ${euid} -s ${eshell} \
614 -d ${ehome} -c "Added by portage for ${PN}" \
615 -g ${egroups} ${euser} "$@" || die "enewuser failed"
616 fi
617 ;;
618
605 *) 619 *)
606 if [[ -z $@ ]] ; then 620 if [[ -z $@ ]] ; then
607 useradd ${opts} ${euser} \ 621 useradd ${opts} ${euser} \
608 -c "added by portage for ${PN}" \ 622 -c "added by portage for ${PN}" \
609 || die "enewuser failed" 623 || die "enewuser failed"

Legend:
Removed from v.1.217  
changed lines
  Added in v.1.218

  ViewVC Help
Powered by ViewVC 1.1.20