1 |
On Wed, 2019-06-12 at 21:11 -0400, Michael Orlitzky wrote: |
2 |
> On 6/11/19 12:23 PM, Michał Górny wrote: |
3 |
> > |
4 |
> > +# @FUNCTION: user_get_nologin |
5 |
> > +# @INTERNAL |
6 |
> > +# @DESCRIPTION: |
7 |
> > +# Find an appropriate 'nologin' shell for the platform, and output |
8 |
> > +# its path. |
9 |
> > +user_get_nologin() { |
10 |
> |
11 |
> This isn't a great name for this function, because it doesn't have |
12 |
> anything to do with the user being added. How about |
13 |
> userland_get_nologin? Then it could take the userland as an argument... |
14 |
|
15 |
user_ is eclass name prefix. |
16 |
|
17 |
> |
18 |
> |
19 |
> > + case ${USERLAND} in |
20 |
> > + GNU) eshell="/bin/false" ;; |
21 |
> |
22 |
> to eliminate that dependency on the global variable. In other words, the |
23 |
> above could become "case $1..." to make the function self-contained. |
24 |
> |
25 |
> |
26 |
> |
27 |
> > + eshell=$(user_get_nologin) |
28 |
> |
29 |
> Then this would have to become |
30 |
> |
31 |
> eshell=$(userland_get_nologin "${USERLAND}") |
32 |
|
33 |
Do you have any real use for that? |
34 |
|
35 |
-- |
36 |
Best regards, |
37 |
Michał Górny |