ovs-ctl: Pull system_type and system_version from config file
[openvswitch] / utilities / ovs-ctl.in
index ee6035c078a9815882937056d41b2ffc2f30b6c6..5640ee88d6c0b86db8f387549dddd8c770a35637 100755 (executable)
@@ -373,7 +373,13 @@ set_defaults () {
     DPORT=
     SPORT=
 
-    if (lsb_release --id) >/dev/null 2>&1; then
+    type_file=$etcdir/system-type.conf
+    version_file=$etcdir/system-version.conf
+
+    if test -e "$type_file" ; then
+        SYSTEM_TYPE=`cat $type_file`
+        SYSTEM_VERSION=`cat $version_file`
+    elif (lsb_release --id) >/dev/null 2>&1; then
         SYSTEM_TYPE=`lsb_release --id -s`
         system_release=`lsb_release --release -s`
         system_codename=`lsb_release --codename -s`