On Mon, Apr 30, 2007 at 07:17:06PM -0700, Adam Megacz wrote:
> 
> I've modified create-user to make it idempotent.  That is, you can run
> it for a user who already exists, and it: a) won't fail and b) won't
> have any [significant] effect.
> 
> Once we start creating significant numbers of users, if we make a
> change to create-user, we'll want to apply those changes to all
> existing users too.  Idempotency lets us simply run create-user again
> on all userids.  If you add new commands to create-user, please ensure
> that they are idempotent.
> 
> In doing so, I had to add "|| true" after the ldapadd commands because
> I don't know how to tell ldapadd "create this entry only if it does
> not exist, but do not fail if it already exists".  The "|| true" is
> non-optimal because it will mask *true* failures.  If anybody who
> knows more than I do about this can find a better solution, that would
> be cool.

-c option does that, and I would assume it has proper exit codes.



_______________________________________________
HCoop-SysAdmin mailing list
[email protected]
http://hcoop.net/cgi-bin/mailman/listinfo/hcoop-sysadmin

Reply via email to