[ovs-dev] [PATCH 04/10] ovs-pki: Workaround lack of /dev/stdin in Windows.
Gurucharan Shetty
shettyg at nicira.com
Wed May 14 22:45:30 UTC 2014
How about making the following assumption?
diff --git a/utilities/ovs-pki.in b/utilities/ovs-pki.in
index 7f56b4e..417fdf4 100755
--- a/utilities/ovs-pki.in
+++ b/utilities/ovs-pki.in
@@ -461,7 +461,12 @@ sign_request() {
must_not_exist "$2"
pkidir_must_exist
- request_file="`pwd`/$1"
+ if [ "`echo $1 | cut -c1`" = "/" ]; then
+ request_file="$1"
+ else
+ request_file="`pwd`/$1"
+ fi
+
(cd "$pkidir/${type}ca" &&
openssl ca -config ca.cnf -batch -in "$request_file") \
> "$2.tmp$$" 2>&3
On Wed, May 14, 2014 at 12:58 PM, Ben Pfaff <blp at nicira.com> wrote:
> On May 14, 2014 11:35 AM, "Gurucharan Shetty" <shettyg at nicira.com> wrote:
>>
>> On Wed, May 14, 2014 at 11:18 AM, Ben Pfaff <blp at nicira.com> wrote:
>> > On Tue, May 13, 2014 at 09:03:18AM -0700, Gurucharan Shetty wrote:
>> >> This lets us generate certs for unit tests on Windows
>> >>
>> >> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
>> >
>> > This will fail if $1 is absolute (if it begins with /):
>> >> + request_file="`pwd`/$1"
>> Reading the man page gave me an impression that 'name' is just a
>> prefix. I guess not. I will fix it in v2.
>
> I think that it would most commonly be just a simple prefix, but i can
> imagine a script calling ovs-pki with a fully qualified name as that prefix.
> Since (I guess) this worked before, I'd like it to continue working.
>
> Thanks,
>
> Ben.
More information about the dev
mailing list