[PATCH 7/7 rhel6-branch] bonding support: enable bonding in NM in target system

Radek Vykydal rvykydal at redhat.com
Mon Aug 27 08:46:40 UTC 2012


This may be temporary, I am discussing NM default with NM
---
 network.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/network.py b/network.py
index f9142ee..86214db 100644
--- a/network.py
+++ b/network.py
@@ -624,6 +624,10 @@ class Network:
                 return True
         return False
 
+    def hasBondDevice(self):
+        return any (dev for dev in self.netdevices.values()
+                    if dev.get('TYPE') == 'Bond')
+
     def write(self):
 
         ifcfglog.debug("Network.write() called")
@@ -679,6 +683,9 @@ class Network:
         if dev.get('IPV6_DEFAULTGW'):
             f.write("IPV6_DEFAULTGW=%s\n" % (dev.get('IPV6_DEFAULTGW'),))
 
+        if self.hasBondDevice():
+            f.write("NM_BOND_VLAN_ENABLED=yes\n")
+
         f.close()
         shutil.move(newnetwork, networkConfFile)
 
-- 
1.7.4



More information about the anaconda-patches mailing list