"dev" <dev-boun...@openvswitch.org> wrote on 08/14/2016 02:39:56 PM:
> From: Ben Pfaff <b...@ovn.org> > To: dev@openvswitch.org > Cc: Matthew Mulsow/Austin/IBM@IBMUS, Ben Pfaff <b...@ovn.org> > Date: 08/14/2016 02:40 PM > Subject: [ovs-dev] [PATCH] ovs-ctl: Properly handle shell quoting in > os-release. > Sent by: "dev" <dev-boun...@openvswitch.org> > > Until now, this code did not strip "" or '' from variable assignments in > os-release. This fixes the problem. > > CC: Matt Mulsow <mamul...@us.ibm.com> > Fixes: c60d6b096436 ("ovs-ctl: support populating system info from / > etc/os-release") > Signed-off-by: Ben Pfaff <b...@ovn.org> > --- > I have not tested this. > > utilities/ovs-ctl.in | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in > index ff3eaf2..dc275f8 100755 > --- a/utilities/ovs-ctl.in > +++ b/utilities/ovs-ctl.in > @@ -523,8 +523,8 @@ set_defaults () { > SYSTEM_TYPE=`cat $type_file` > SYSTEM_VERSION=`cat $version_file` > elif test -e "@sysconfdir@/os-release"; then > - SYSTEM_TYPE=`awk -F= '/^ID=/{print $2}' @sysconfdir@/os-release` > - SYSTEM_VERSION=`awk -F= '/^VERSION_ID=/{print $2}' > @sysconfdir@/os-release` > + SYSTEM_TYPE=`. '@sysconfdir@/os-release' && echo "$ID"` > + SYSTEM_VERSION=`. '@sysconfdir@/os-release' && echo "$VERSION_ID"` > elif (lsb_release --id) >/dev/null 2>&1; then > SYSTEM_TYPE=`lsb_release --id -s` > system_release=`lsb_release --release -s` > -- > 2.1.3 I've not seen this problem in our tests, but I have seen in it our wild, so... Acked-by: Ryan Moats <rmo...@us.ibm.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev