Reported-by: Cong Wang <xiyou.wangc...@gmail.com>
Signed-off-by: Ben Pfaff <b...@nicira.com>
---
Cong, will you verify that this makes the init script work OK for
your kernel with OVS built-in?

Thanks,

Ben.

 utilities/ovs-ctl.in |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 8288e13..63dbbca 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -35,6 +35,12 @@ insert_openvswitch_mod_if_required () {
     test -e /sys/module/openvswitch -o -e /sys/module/openvswitch_mod && \
      return 0
 
+    # If "ovs-dpctl show" succeeds, even though the kernel module doesn't
+    # appear to be loaded, then Open vSwitch support is built into the
+    # kernel instead of modular (or the kernel module is loaded but sysfs
+    # is not mounted).
+    ovs-dpctl show -voff >/dev/null 2>&1 && return 0
+
     # Load openvswitch.  If that's successful then we're done.
     action "Inserting openvswitch module" modprobe openvswitch && return 0
 
-- 
1.7.2.5

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

Reply via email to