[ovs-dev] [PATCH] utilities: don't use a bashism to check that datapath exists

Ben Pfaff blp at ovn.org
Sat Aug 4 00:07:46 UTC 2018


Thanks everyone, applied to master and branch-2.10.

On Wed, Aug 01, 2018 at 02:28:03PM -0700, Martin Xu wrote:
> Thanks for fixing this.
> 
> Martin
> 
> On Wed, Aug 1, 2018 at 8:48 AM, Timothy Redaelli <tredaelli at redhat.com>
> wrote:
> 
> > [[ ]] syntax is not supported, at least, by dash that Debian, Ubuntu and
> > other
> > linux distributions may use instead of bash.
> >
> > This commit uses, instead, a POSIX way that is compatible with any POSIX
> > shell (bash, dash, busybox sh, etc).
> >
> > CC: Martin Xu <martinxu9.ovs at gmail.com>
> > Fixes: 9763d17fbd05 ("utilities: check datapath exists before conntrack
> > flush")
> >
> > Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
> > ---
> >  utilities/ovs-lib.in | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
> > index d6ef77b6e..c3b76ec94 100644
> > --- a/utilities/ovs-lib.in
> > +++ b/utilities/ovs-lib.in
> > @@ -605,7 +605,7 @@ force_reload_kmod () {
> >      stop_ovsdb
> >      start_ovsdb || return 1
> >
> > -    if [[ $(ovs-dpctl show) ]]; then
> > +    if [ -n "$(ovs-dpctl show)" ]; then
> >          action "Flush old conntrack entries" ovs-appctl
> > dpctl/flush-conntrack
> >      fi
> >      stop_forwarding
> > --
> > 2.17.1
> >
> >
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev


More information about the dev mailing list