Bug#362409: [Adduser-devel] Bug#362409: delgroup --only-if-empty
returns error code 1, if group is not empty
Joerg Hoh
joerg at joerghoh.de
Thu Apr 13 19:01:14 UTC 2006
On Thu, Apr 13, 2006 at 02:52:44PM +0200, Matthias Klose wrote:
> severity 362409 normal
> thanks
>
> Marc Haber writes:
>
> > delgroup exits with an error return value if a command cannot be
> > executed. delgroup --only-if-empty cannot be executed if the group is
> > non-empty. Hence, it is the correct thing to exit with a non-zero exit
> > value.
>
> - could you point out a use case where you want this behaviour?
This might be useful if you want to delete a group only if there's no user
in that group.
> - if you can point out a use case, and do not want to change that
> option, then please add an --ignore-fail-on-non-empty option.
Probably not; I don't want an option with that much negations in the
option name itself.
> - you cannot differentiate between "group does not exist" and
> "group not empty" in the return code. If I have to find out
> this information with getent myself, why does this option
> exist at all?
What's your scenario? What do you want to achieve? Maybe we can find
together a better solution than just adding even more options.
Joerg
--
What did you do to the cat? It looks half-dead. -Schroedinger's wife
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20060413/c5ad803c/attachment-0003.pgp
More information about the Adduser-devel
mailing list