From: Justin Pettit Date: Fri, 9 Apr 2010 07:40:18 +0000 (-0700) Subject: xenserver: Only register xsconsole plugin if OVS is running X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7de953d1862206f1e5eb928e14e998d6c93926c;p=openvswitch xenserver: Only register xsconsole plugin if OVS is running 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. --- diff --git a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py index 74eb2125..252c6e8a 100644 --- a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py +++ b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py @@ -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()