Currently system-type and system-version can only be set through ovs-vsctl and ovs-ctl in the commandline. This patch allows you to place system-type.conf and system-version.conf files in $etcdir and their contents will be used if no arguments are specified with ovs-vsctl or ovs-ctl.
Issue: #9033 Signed-off-by: Gurucharan Shetty <[email protected]> --- utilities/ovs-ctl.in | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index ee6035c..5640ee8 100755 --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -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` -- 1.7.5.4 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
