On Wed, 2019-06-12 at 21:11 -0400, Michael Orlitzky wrote:
> On 6/11/19 12:23 PM, Michał Górny wrote:
> >  
> > +# @FUNCTION: user_get_nologin
> > +# @INTERNAL
> > +# @DESCRIPTION:
> > +# Find an appropriate 'nologin' shell for the platform, and output
> > +# its path.
> > +user_get_nologin() {
> 
> This isn't a great name for this function, because it doesn't have
> anything to do with the user being added. How about
> userland_get_nologin? Then it could take the userland as an argument...

user_ is eclass name prefix.

> 
> 
> > +           case ${USERLAND} in
> > +                   GNU)    eshell="/bin/false" ;;
> 
> to eliminate that dependency on the global variable. In other words, the
> above could become "case $1..." to make the function self-contained.
> 
> 
> 
> > +           eshell=$(user_get_nologin)
> 
> Then this would have to become
> 
>   eshell=$(userland_get_nologin "${USERLAND}")

Do you have any real use for that?

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to