From a7de953d1862206f1e5eb928e14e998d6c93926c Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Fri, 9 Apr 2010 00:40:18 -0700 Subject: [PATCH] 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. --- xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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() -- 2.30.2