Blame SOURCES/netcf-Properly-classify-bond-devices-with-no-slaves.patch

38eb60
From f3ec5157c7fc97e31c7b48e3a56da268de7e4216 Mon Sep 17 00:00:00 2001
38eb60
From: Laine Stump <laine@laine.org>
38eb60
Date: Tue, 13 Oct 2015 14:42:35 -0400
38eb60
Subject: [PATCH 2/2] Properly classify bond devices with no slaves
38eb60
38eb60
Although initscripts only considers an interface to be a bond if it
38eb60
has slaves, there are times when setting up a bond, or testing, when a
38eb60
bond may not have any slaves (yet) but does have a BONDING_OPTS
38eb60
attribute. Previously in those situations netcf would identify the
38eb60
interface as a plain ethernet. This patch makes the check more
38eb60
inclusive - now any interface with slaves *or* with a BONDING_OPTS
38eb60
attribute is considered to be a bond.
38eb60
38eb60
This patch was inspired by an earlier patch sent by Lubomir Rintel
38eb60
which looked for BONDING_OPTS *instead of* looking for slaves.
38eb60
---
38eb60
 data/xml/redhat-put.xsl | 2 +-
38eb60
 1 file changed, 1 insertion(+), 1 deletion(-)
38eb60
38eb60
diff --git a/data/xml/redhat-put.xsl b/data/xml/redhat-put.xsl
38eb60
index ed56c66..89145e5 100644
38eb60
--- a/data/xml/redhat-put.xsl
38eb60
+++ b/data/xml/redhat-put.xsl
38eb60
@@ -135,7 +135,7 @@
38eb60
   </xsl:template>
38eb60
 
38eb60
   
38eb60
-                match="tree[node[@label = 'DEVICE'][@value = //tree/node[@label = 'MASTER']/@value]][count(node[@label = 'BRIDGE']) = 0]">
38eb60
+                match="tree[count(node[@label = 'BONDING_OPTS']) or (node[@label = 'DEVICE'][@value = //tree/node[@label = 'MASTER']/@value])][count(node[@label = 'BRIDGE']) = 0]">
38eb60
     <interface type="bond">
38eb60
       <xsl:call-template name="name-attr"/>
38eb60
       <xsl:call-template name="startmode"/>
38eb60
-- 
38eb60
2.4.3
38eb60