]> git.proxmox.com Git - ovs.git/commitdiff
xenserver: Only register xsconsole plugin if OVS is running
authorJustin Pettit <jpettit@nicira.com>
Fri, 9 Apr 2010 07:40:18 +0000 (00:40 -0700)
committerJustin Pettit <jpettit@nicira.com>
Mon, 12 Apr 2010 19:39:45 +0000 (12:39 -0700)
The 5.6.0 XenServer release will include OVS but not have it enabled by
default.  By only registering the xsconsole plugin on systems running OVS,
this plugin can be included in the main distribution.

Based on commit 0ebd737 from the xs5.7 branch written by Ian Campbell.

xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py

index 74eb2125916913c6fdf926dee445b9f77f934036..252c6e8a846ea2dd5954dc0536878d82633e03cc 100644 (file)
@@ -327,5 +327,6 @@ class XSFeatureVSwitch:
             }
         )
 
-# Register this plugin when module is imported
-XSFeatureVSwitch().Register()
+# Register this plugin when module is imported, IFF vswitchd is running
+if os.path.exists('/var/run/openvswitch/ovs-vswitchd.pid'):
+    XSFeatureVSwitch().Register()