On Mon, Oct 22, 2012 at 12:43:11PM -0700, Gurucharan Shetty wrote:
> Some applications expect subject DNs to be unique.
>
> Bug #13609.
> Signed-off-by: Gurucharan Shetty<[email protected]>
Looks good.
I think that
> + if unique=`uuidgen 2>/dev/null`; then
> + :
> + else
> + unique=`date +"%Y %b %d %T"`
> + fi
can be simplified to:
unique=`uuidgen 2>/dev/null` || unique=`date +"%Y %b %d %T"`
but the way you have it is perfectly good too.
It might be a good idea to put parentheses around uuidgen because of
this note in the Autoconf manual (which specifically mentions
FreeBSD):
On the other hand, some shells, such as Solaris or FreeBSD
`/bin/sh', warn about missing programs before performing redirections.
Therefore, to silently check whether a program exists, it is necessary
to perform redirections on a subshell:
$ /bin/sh -c 'nosuch 2>/dev/null'
nosuch: not found
$ /bin/sh -c '(nosuch) 2>/dev/null'
$ bash -c 'nosuch 2>/dev/null'
Thanks,
Ben.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev