forked from pool/cloud-init
Robert Schweikert
29723d4dbe
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=154
21 lines
710 B
Diff
21 lines
710 B
Diff
--- cloudinit/net/sysconfig.py.orig
|
|
+++ cloudinit/net/sysconfig.py
|
|
@@ -748,7 +748,7 @@ class Renderer(renderer.Renderer):
|
|
def available(target=None):
|
|
sysconfig = available_sysconfig(target=target)
|
|
nm = available_nm(target=target)
|
|
- return (util.get_linux_distro()[0] in KNOWN_DISTROS
|
|
+ return (util.system_info()['variant'] in KNOWN_DISTROS
|
|
and any([nm, sysconfig]))
|
|
|
|
|
|
@@ -758,6 +758,8 @@ def available_sysconfig(target=None):
|
|
for p in expected:
|
|
if not util.which(p, search=search, target=target):
|
|
return False
|
|
+ else:
|
|
+ return True
|
|
|
|
expected_paths = ['etc/sysconfig/network/scripts/functions.netconfig']
|
|
for p in expected_paths:
|