From 7ccab1bbe508f059e621583c0c05df03c5daaf2b Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Wed, 23 Oct 2019 19:06:19 +0000 Subject: 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 --- cloudinit/net/sysconfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cloudinit/net') 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): -- cgit v1.2.3