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.

El Barto wrote:

Hello,

I'm using shell script to create my user, for testing if the user exist I just do a :

$ pts membership newuser

The problem is that pts always set the return variable to 0.
To bypass that I just pipe the result to wc -l because the error is writing on fd 2, wc doesn't count this.

Is there a reason for always returning 0 ?

P.S. : By the way I'm using Openafs 1.4.4

Thanks.


--
   +--------------------------------------------------------------+
  / [EMAIL PROTECTED]  919-445-9302  http://www.unc.edu/~utoddl /
 /     A bicycle can't stand alone because it is two-tired.     /
+--------------------------------------------------------------+
_______________________________________________
OpenAFS-devel mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to