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

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