Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Mike Frysinger <vapier@g.o>
Subject: Re: RFC: esethome
Date: Wed, 13 Jun 2012 16:51:11 -0400
On Wednesday 13 June 2012 15:35:40 Ian Stakenvicius wrote:
> --- user.eclass           [some timestamp]
> +++ user.eclass.esethome  [some other timestamp]
> @@ -388,3 +388,63 @@
>  }
> 
>  fi
> +
> +# @FUNCTION: esethome

has to be inside the giant if block.  so put this above the "fi".

> +# @USAGE: <user> <homedir>
> +# @DESCRIPTION:
> +# Update the home directory in a platform-agnostic way.
> +# Required parameters is the username and the new home directory.
> +# Specify -1 if you want to set home to the enewuser default
> +# of /dev/null.
> +# If the new home directory does not exist, it is created.
> +# Any previously existing home directory is NOT moved.
> +esethome() {
> +       _assert_pkg_ebuild_phase ${FUNCNAME}
> +
> +       # get the username
> +       local euser=$1; shift
> +       if [[ -z ${euser} ]] ; then
> +               eerror "No username specified !"
> +               die "Cannot call esethome without a username"
> +       fi
> +
> +       # lets see if the username already exists
> +       if [[ ! -n $(egetent passwd "${euser}") ]] ; then

"! -n" -> "-z"
-mike
Attachment:
signature.asc (This is a digitally signed message part.)
Replies:
Re: RFC: esethome
-- Peter Stuge
Re: RFC: esethome
-- Ian Stakenvicius
References:
RFC: enewuser should force updates to shell and home
-- Ian Stakenvicius
Re: RFC: enewuser should force updates to shell and home
-- Mike Frysinger
Re: RFC: esethome
-- Ian Stakenvicius
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: RFC: esethome
Next by thread:
Re: RFC: esethome
Previous by date:
Re: RFC: esethome
Next by date:
RFC: VOICEMAIL_STORAGE as a USE_EXPAND for net-misc/asterisk


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.