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

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to