On Mon, Sep 30, 2013 at 7:27 PM, Duffie Cooley <dcoo...@nicira.com> wrote: > From: Duffie Cooley <dcoo...@nicira.com> > 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-off-by: Duffie Cooley <dcoo...@nicira.com> > --- > rhel/etc_init.d_openvswitch | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/rhel/etc_init.d_openvswitch b/rhel/etc_init.d_openvswitch > index 7e64132..6a53cef 100755 > --- a/rhel/etc_init.d_openvswitch > +++ b/rhel/etc_init.d_openvswitch > @@ -5,7 +5,7 @@ > # chkconfig: 2345 09 91 > # description: Manage Open vSwitch kernel modules and user-space daemons > > -# Copyright (C) 2009, 2010, 2011 Nicira, Inc. > +# Copyright (C) 2009, 2010, 2011, 2013 Nicira, Inc. > # > # Licensed under the Apache License, Version 2.0 (the "License"); > # you may not use this file except in compliance with the License. > @@ -81,6 +81,7 @@ case $1 in > ;; > status) > ovs_ctl status > + exit $? > ;; > version) > ovs_ctl version > -- > 1.8.1.2 > I don't think this helps. The exit status is always 0. I broke this with my implementation of 'ovs_ctl' in ovs-lib tee'ing the o/p to ovs-ctl.log. tee will return an exit status of success even though the previous command returned an exit status of 1.
I can use the PIPESTATUS variable. But I don't think it is POSIX compliant. Any other ideas? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev