ovs-ctl: Pull system_type and system_version from config file
[sliver-openvswitch.git] / utilities / ovs-ctl.in
index ee6035c..5640ee8 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`