meta-flow: Correctly set destination MAC in mf_set_flow_value().
[sliver-openvswitch.git] / utilities / ovs-ctl.in
index 8788e4a..f10e98a 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012 Nicira Networks, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@ case $0 in
     */*) dir0=`echo "$0" | sed 's,/[^/]*$,,'` ;;
     *) dir0=./ ;;
 esac
-. "$dir0/ovs-lib.sh" || exit 1
+. "$dir0/ovs-lib" || exit 1
 
 for dir in "$sbindir" "$bindir" /sbin /bin /usr/sbin /usr/bin; do
     case :$PATH: in
@@ -199,9 +199,10 @@ start () {
     if daemon_is_running ovs-vswitchd; then
        log_success_msg "ovs-vswitchd is already running"
     else
-       # Increase the limit on the number of open file descriptors since
-       # ovs-vswitchd needs a few per bridge
-       ulimit -n 4096
+       # Increase the limit on the number of open file descriptors.
+       # ovs-vswitchd needs 16 per datapath, plus a few extra, so this
+       # should allow for 256 (or more) bridges.
+       ulimit -n 5000
 
        # Start ovs-vswitchd.
        set ovs-vswitchd unix:"$DB_SOCK"
@@ -373,7 +374,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`