forked from pool/cloud-init
83245c4ac8
initial package OBS-URL: https://build.opensuse.org/request/show/172828 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=1
23 lines
880 B
Diff
23 lines
880 B
Diff
Index: cloud-init-0.6.3/cloudinit/netinfo.py
|
|
===================================================================
|
|
--- cloud-init-0.6.3.orig/cloudinit/netinfo.py
|
|
+++ cloud-init-0.6.3/cloudinit/netinfo.py
|
|
@@ -24,7 +24,7 @@ import subprocess
|
|
|
|
def netdev_info(empty=""):
|
|
fields = ("hwaddr", "addr", "bcast", "mask")
|
|
- ifcfg_out = str(subprocess.check_output(["ifconfig", "-a"]))
|
|
+ ifcfg_out = str(subprocess.Popen(["ifconfig", "-a"], stdout=subprocess.PIPE).communicate()[0])
|
|
devs = {}
|
|
for line in ifcfg_out.splitlines():
|
|
if len(line) == 0:
|
|
@@ -70,7 +70,7 @@ def netdev_info(empty=""):
|
|
|
|
|
|
def route_info():
|
|
- route_out = str(subprocess.check_output(["route", "-n"]))
|
|
+ route_out = str(subprocess.Popen(["route", "-n"], stdout=subprocess.PIPE).communicate()[0])
|
|
routes = []
|
|
for line in route_out.splitlines()[1:]:
|
|
if not line:
|