summaryrefslogtreecommitdiff
path: root/cloudinit/net/sysconfig.py
diff options
context:
space:
mode:
authorRobert Schweikert <rjschwei@suse.com>2019-10-23 19:06:19 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-10-23 19:06:19 +0000
commit7ccab1bbe508f059e621583c0c05df03c5daaf2b (patch)
tree63057e4c1f90d55f2f03cecf225d5c3abddf6260 /cloudinit/net/sysconfig.py
parentc47b46edbfb328c963f6769e8b95a947e2eba932 (diff)
downloadvyos-cloud-init-7ccab1bbe508f059e621583c0c05df03c5daaf2b.tar.gz
vyos-cloud-init-7ccab1bbe508f059e621583c0c05df03c5daaf2b.zip
net/sysconfig: fix available check on SUSE distros
In addition to ifup/ifdown the sysconfig renderer looks for evidence that the sysconfig directory is properly populated. This secondary check only considered RedHat specific location. Fix this by adding a SUSE specific file and returning True if either RedHat or SUSE file is present. LP: #1849378
Diffstat (limited to 'cloudinit/net/sysconfig.py')
-rw-r--r--cloudinit/net/sysconfig.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
index e3815968..6717d924 100644
--- a/cloudinit/net/sysconfig.py
+++ b/cloudinit/net/sysconfig.py
@@ -751,11 +751,11 @@ def available_sysconfig(target=None):
expected_paths = [
'etc/sysconfig/network-scripts/network-functions',
- 'etc/sysconfig/network-scripts/ifdown-eth']
+ 'etc/sysconfig/config']
for p in expected_paths:
- if not os.path.isfile(util.target_path(target, p)):
- return False
- return True
+ if os.path.isfile(util.target_path(target, p)):
+ return True
+ return False
def available_nm(target=None):