1 |
On Friday 18 January 2008, Marius Mauch wrote: |
2 |
> "Hanno Böck" <hanno@g.o> wrote: |
3 |
> > What is the correct way to handle this? I'd suggest that enewuser might |
4 |
> > get some "force"-parameter that tells it to delete and recreate the user |
5 |
> > if it already exists. Thoughts? |
6 |
> |
7 |
> Tell the user to do it manually in pkg_setup/postinst. This is |
8 |
> something that IMO shouldn't be done by the ebuild/package manager for |
9 |
> two reasons: |
10 |
> - extreme cornercase, or how often does this come up? |
11 |
> - the system might rely on the current settings in unexpected ways |
12 |
|
13 |
right, there is no way (by design) to force these settings on an already |
14 |
created user. if the old path really truly should not be the old value, you |
15 |
can do something like this in pkg_setup: |
16 |
if [[ $(egetent passwd user | cut -d: -f6) == "/the/old/path" ]] ; then |
17 |
eerror "please run usermod -m -d /new/path ......" |
18 |
die "moocow" |
19 |
fi |
20 |
-mike |