1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA256 |
3 |
|
4 |
On 13/06/12 04:51 PM, Mike Frysinger wrote: |
5 |
> On Wednesday 13 June 2012 15:35:40 Ian Stakenvicius wrote: |
6 |
>> --- user.eclass [some timestamp] +++ |
7 |
>> user.eclass.esethome [some other timestamp] @@ -388,3 +388,63 |
8 |
>> @@ } |
9 |
>> |
10 |
>> fi + +# @FUNCTION: esethome |
11 |
> |
12 |
> has to be inside the giant if block. so put this above the "fi". |
13 |
> |
14 |
>> +# @USAGE: <user> <homedir> +# @DESCRIPTION: +# Update the home |
15 |
>> directory in a platform-agnostic way. +# Required parameters is |
16 |
>> the username and the new home directory. +# Specify -1 if you |
17 |
>> want to set home to the enewuser default +# of /dev/null. +# If |
18 |
>> the new home directory does not exist, it is created. +# Any |
19 |
>> previously existing home directory is NOT moved. +esethome() { + |
20 |
>> _assert_pkg_ebuild_phase ${FUNCNAME} + + # get the |
21 |
>> username + local euser=$1; shift + if [[ -z ${euser} |
22 |
>> ]] ; then + eerror "No username specified !" + |
23 |
>> die "Cannot call esethome without a username" + fi + + |
24 |
>> # lets see if the username already exists + if [[ ! -n |
25 |
>> $(egetent passwd "${euser}") ]] ; then |
26 |
> |
27 |
> "! -n" -> "-z" -mike |
28 |
|
29 |
|
30 |
So outside of syntax issues like above, anyone have any issues with my |
31 |
adding this to user.eclass ? |
32 |
|
33 |
|
34 |
-----BEGIN PGP SIGNATURE----- |
35 |
Version: GnuPG v2.0.17 (GNU/Linux) |
36 |
|
37 |
iF4EAREIAAYFAk/bNaoACgkQ2ugaI38ACPAFRgEApwLkrsqSIW0nVK4l/dUTRzV9 |
38 |
ijEnbfa+BLc1skwfW4QA+gKgpmsz/K5VqXnVWyXocGqO98RYJL8lL3qm7k0Hs6uZ |
39 |
=9i38 |
40 |
-----END PGP SIGNATURE----- |