[OpenAFS-devel] Return value on various command

Jeffrey Hutzelman jhutz@cmu.edu
Mon, 06 Aug 2007 14:14:24 -0400


On Thursday, August 02, 2007 08:38:50 AM -0400 "Todd M. Lewis" 
<utoddl@email.unc.edu> wrote:

> The pts command returns 0 because it successfully listed the membership,
> which was nothing.
>
> What you want is
>
>    pts examine newuser
>
> which will return 0 if 'newuser' exists, 1 otherwise.

It can be argued that 'pts mem' should in fact return a nonzero exit status 
when the entry to be listed doesn't exist.  After all, that is an error, 
distinct from the case where the entry does exist but has no members.

-- Jeff