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