Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-02 Thread Gurucharan Shetty
As Paul mentioned, there is a missing descriptor 4 in the code. I will fix it up, test it and send a patch. On Tue, Oct 1, 2013 at 4:17 PM, Paul Ingram wrote: > OK, but I don't see the redirect to descriptor 4 in the real code (it's > obviously there in the example). > > :: psi > > On Oct 1, 2013

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Paul Ingram
OK, but I don't see the redirect to descriptor 4 in the real code (it's obviously there in the example). :: psi On Oct 1, 2013, at 3:58 PM, Duffie Cooley wrote: > From the reference. > > Lets examine that step by step. > > ( ( ( ( someprog; #part6 > echo $? >&3#part

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Duffie Cooley
>From the reference. Lets examine that step by step. |( ( ( ( someprog; #part6 echo $? >&3#part5 ) | filter >&4 #part4 ) 3>&1 #part3 ) | stdintoexitstatus#part2 ) 4>&1 #part1| >From bottom up: 1. A subshell is c

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Paul Ingram
Why the redirect from descriptor 4? :: psi On Oct 1, 2013, at 3:13 PM, Duffie Cooley wrote: > What about this? > > referenced from here. > > http://unix.stackexchange.com/questions/14270/get-exit-status-of-process-thats-piped-to-another/70675#70675 > > diff --git a/utilities/ovs-lib.in b/uti

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Ben Pfaff
That is pretty horrible. I was trying to construct something similar manually, but you finished it off. I suggest adding spaces between the initial s, to avoid this pitfall described at http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18: If a character sequen

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Duffie Cooley
What about this? referenced from here. http://unix.stackexchange.com/questions/14270/get-exit-status-of-process-thats-piped-to-another/70675#70675 diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in index 1684ddc..5286e12 100644 --- a/utilities/ovs-lib.in +++ b/utilities/ovs-lib.in @@ -41,6

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Gurucharan Shetty
This patch works for me, but it is a little hacky. diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in index 1684ddc..b0cdaf2 100644 --- a/utilities/ovs-lib.in +++ b/utilities/ovs-lib.in @@ -51,7 +51,13 @@ ovs_ctl () { ;; *) echo "`date -u`:$@" >> "${logdir}/ovs

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Gurucharan Shetty
On Mon, Sep 30, 2013 at 7:27 PM, Duffie Cooley wrote: > From: Duffie Cooley > This is a fix for a request to make sure that the openvswitch status command > in rhel based distros gives a useful exit status. That was fixed in > > commit 5e0c05bc058c78a11be6747f62e6ad88e5d06b70 > debian: Fix exit s

Re: [ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-10-01 Thread Ben Pfaff
On Mon, Sep 30, 2013 at 07:27:07PM -0700, Duffie Cooley wrote: > From: Duffie Cooley > This is a fix for a request to make sure that the openvswitch status command > in rhel based distros gives a useful exit status. That was fixed in > > commit 5e0c05bc058c78a11be6747f62e6ad88e5d06b70 > debian: F

[ovs-dev] [PATCH] rhel: fix the exit status of the openvswitch init script.

2013-09-30 Thread Duffie Cooley
From: Duffie Cooley This is a fix for a request to make sure that the openvswitch status command in rhel based distros gives a useful exit status. That was fixed in commit 5e0c05bc058c78a11be6747f62e6ad88e5d06b70 debian: Fix exit status of openvswitch-switch init script "status" command Signed