Blame SOURCES/netcf-remove-extraneous-quotes-from-BONDING_OPTS.patch

e1da54
From d25230cb26cdd6603d2758bdb2d3c56925d8219e Mon Sep 17 00:00:00 2001
e1da54
From: Satoru SATOH <ssato@redhat.com>
e1da54
Date: Wed, 3 Jul 2013 13:17:27 -0400
e1da54
Subject: [PATCH] remove extraneous quotes from BONDING_OPTS
e1da54
e1da54
This fixes: https://bugzilla.redhat.com/show_bug.cgi?id=798851
e1da54
e1da54
For some unknown reason, the BONDING_OPTS setting in ifcfg files was
e1da54
being set with an extra set of single quotes. So, for example, instead of:
e1da54
e1da54
  BONDING_OPTS="mode=active-backup primary=eth1 miimon=100 updelay=10 use_carrier=0"
e1da54
e1da54
we would get (e.g.):
e1da54
e1da54
  BONDING_OPTS="'mode=active-backup primary=eth1 miimon=100 updelay=10 use_carrier=0'"
e1da54
e1da54
Even when there weren't any BONDING_OPTS to set, the ifcfg file would
e1da54
still get:
e1da54
e1da54
  BONDING_OPTS="''"
e1da54
e1da54
Since the extra quotes are added in all cases, and are never needed,
e1da54
this patch just unconditionally removes them.
e1da54
e1da54
(cherry picked from commit 581ff3f252552cf5edc8e47c4a72667a39e133ba)
e1da54
e1da54
Conflicts:
e1da54
e1da54
 AUTHORS - one additional name upstream for debian-specific patch not
e1da54
   yet in RHEL.
e1da54
e1da54
 tests/suse/schema/*.xml - the upstream patch modified some files that
e1da54
   weren't yet being shipped in the tarball as of netcf-0.2.3; they are
e1da54
   unused in RHEL anyway.
e1da54
---
e1da54
 AUTHORS                               | 1 +
e1da54
 data/xml/util-get.xsl                 | 2 --
e1da54
 tests/redhat/schema/bond-arp.xml      | 2 +-
e1da54
 tests/redhat/schema/bond-defaults.xml | 2 +-
e1da54
 tests/redhat/schema/bond.xml          | 2 +-
e1da54
 tests/redhat/schema/bridge-bond.xml   | 2 +-
e1da54
 6 files changed, 5 insertions(+), 6 deletions(-)
e1da54
e1da54
diff --git a/AUTHORS b/AUTHORS
e1da54
index b41f26e..2512ac8 100644
e1da54
--- a/AUTHORS
e1da54
+++ b/AUTHORS
e1da54
@@ -19,3 +19,4 @@ Contributions by:
e1da54
   Guido Günther    <agx@sigxcpu.org>
e1da54
   Ed Maste         <emaste@freebsd.org>
e1da54
   Hendrik Schwartke <hendrik@os-t.de>
e1da54
+  Satoru SATOH     <ssato@redhat.com>
e1da54
diff --git a/data/xml/util-get.xsl b/data/xml/util-get.xsl
e1da54
index 9edace3..ac0a320 100644
e1da54
--- a/data/xml/util-get.xsl
e1da54
+++ b/data/xml/util-get.xsl
e1da54
@@ -3,7 +3,6 @@
e1da54
                 version="1.0">
e1da54
 
e1da54
   <xsl:template name="bonding-opts">
e1da54
-    <xsl:text>'</xsl:text>
e1da54
     <xsl:if test="bond/@mode">mode=<xsl:value-of select='bond/@mode'/></xsl:if>
e1da54
     <xsl:if test="bond/@mode = 'active-backup'"> primary=<xsl:value-of select='bond/interface[1]/@name'/></xsl:if>
e1da54
     <xsl:if test="bond/miimon">
e1da54
@@ -21,7 +20,6 @@
e1da54
       <xsl:text> arp_ip_target=</xsl:text><xsl:value-of select="bond/arpmon/@target"/>
e1da54
       <xsl:if test="bond/arpmon/@validate"><xsl:text> arp_validate=</xsl:text><xsl:value-of select="bond/arpmon/@validate"/></xsl:if>
e1da54
     </xsl:if>
e1da54
-    <xsl:text>'</xsl:text>
e1da54
   </xsl:template>
e1da54
 
e1da54
 </xsl:stylesheet>
e1da54
diff --git a/tests/redhat/schema/bond-arp.xml b/tests/redhat/schema/bond-arp.xml
e1da54
index 6a53d09..884cb84 100644
e1da54
--- a/tests/redhat/schema/bond-arp.xml
e1da54
+++ b/tests/redhat/schema/bond-arp.xml
e1da54
@@ -7,7 +7,7 @@
e1da54
     <node label="IPADDR" value="192.168.50.7"/>
e1da54
     <node label="NETMASK" value="255.255.255.0"/>
e1da54
     <node label="GATEWAY" value="192.168.50.1"/>
e1da54
-    <node label="BONDING_OPTS" value="'mode=active-backup primary=eth1 arp_interval=100 arp_ip_target=192.168.50.1 arp_validate=active'"/>
e1da54
+    <node label="BONDING_OPTS" value="mode=active-backup primary=eth1 arp_interval=100 arp_ip_target=192.168.50.1 arp_validate=active"/>
e1da54
   </tree>
e1da54
   <tree path="/files/etc/sysconfig/network-scripts/ifcfg-eth1">
e1da54
     <node label="DEVICE" value="eth1"/>
e1da54
diff --git a/tests/redhat/schema/bond-defaults.xml b/tests/redhat/schema/bond-defaults.xml
e1da54
index 3e92d19..5ee875d 100644
e1da54
--- a/tests/redhat/schema/bond-defaults.xml
e1da54
+++ b/tests/redhat/schema/bond-defaults.xml
e1da54
@@ -11,7 +11,7 @@
e1da54
     <node label="IPADDR" value="192.168.50.7"/>
e1da54
     <node label="NETMASK" value="255.255.255.0"/>
e1da54
     <node label="GATEWAY" value="192.168.50.1"/>
e1da54
-    <node label="BONDING_OPTS" value="''"/>
e1da54
+    <node label="BONDING_OPTS" value=""/>
e1da54
   </tree>
e1da54
   <tree  path="/files/etc/sysconfig/network-scripts/ifcfg-eth1">
e1da54
     <node label="DEVICE" value="eth1"/>
e1da54
diff --git a/tests/redhat/schema/bond.xml b/tests/redhat/schema/bond.xml
e1da54
index d97542d..4a7e9bf 100644
e1da54
--- a/tests/redhat/schema/bond.xml
e1da54
+++ b/tests/redhat/schema/bond.xml
e1da54
@@ -11,7 +11,7 @@
e1da54
     <node label="IPADDR" value="192.168.50.7"/>
e1da54
     <node label="NETMASK" value="255.255.255.0"/>
e1da54
     <node label="GATEWAY" value="192.168.50.1"/>
e1da54
-    <node label="BONDING_OPTS" value="'mode=active-backup primary=eth1 miimon=100 updelay=10 use_carrier=0'"/>
e1da54
+    <node label="BONDING_OPTS" value="mode=active-backup primary=eth1 miimon=100 updelay=10 use_carrier=0"/>
e1da54
   </tree>
e1da54
   <tree  path="/files/etc/sysconfig/network-scripts/ifcfg-eth1">
e1da54
     <node label="DEVICE" value="eth1"/>
e1da54
diff --git a/tests/redhat/schema/bridge-bond.xml b/tests/redhat/schema/bridge-bond.xml
e1da54
index c72f8d3..0b521d4 100644
e1da54
--- a/tests/redhat/schema/bridge-bond.xml
e1da54
+++ b/tests/redhat/schema/bridge-bond.xml
e1da54
@@ -17,7 +17,7 @@
e1da54
     <node label="DEVICE" value="bond0"/>
e1da54
     <node label="ONBOOT" value="yes"/>
e1da54
     <node label="MTU" value="1500"/>
e1da54
-    <node label="BONDING_OPTS" value="'mode=active-backup primary=eth1 miimon=100 updelay=10 use_carrier=0'"/>
e1da54
+    <node label="BONDING_OPTS" value="mode=active-backup primary=eth1 miimon=100 updelay=10 use_carrier=0"/>
e1da54
     <node label="BRIDGE" value="br0"/>
e1da54
   </tree>
e1da54
   <tree path="/files/etc/sysconfig/network-scripts/ifcfg-eth1">
e1da54
-- 
e1da54
1.8.3.1
e1da54