Ubuntu Pastebin

Paste from smoser at Thu, 14 Apr 2016 15:17:19 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
=== modified file 'cloudinit/net/__init__.py'
--- cloudinit/net/__init__.py	2016-04-13 15:48:38 +0000
+++ cloudinit/net/__init__.py	2016-04-14 15:17:06 +0000
@@ -531,7 +531,10 @@
     content += "\n"
     for iface in sorted(interfaces.values(),
                         key=lambda k: (order[k['type']], k['name'])):
-        content += "auto {name}\n".format(**iface)
+
+        # valid values for 'control' would be: 'auto', 'hotplug', None
+        if iface.get('control', "auto"):
+            content += "allow-{control} {name}\n".format(**iface)
 
         subnets = iface.get('subnets', {})
         if subnets:
Download as text