SHA256
1
0
forked from pool/cloud-init
cloud-init/cloud-init-sysconfig-netpathfix.patch
Dirk Mueller ed9aa9f0d8 - update cloud-init-sysconfig-netpathfix.patch:
* skip checking for files in /etc/sysconfig that never exist
  on a wickedd based system

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=108
2018-02-16 13:24:07 +00:00

38 lines
1.3 KiB
Diff

Index: cloudinit/net/sysconfig.py
===================================================================
--- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py
@@ -91,8 +91,8 @@ class ConfigMap(object):
class Route(ConfigMap):
"""Represents a route configuration."""
- route_fn_tpl_ipv4 = '%(base)s/network-scripts/route-%(name)s'
- route_fn_tpl_ipv6 = '%(base)s/network-scripts/route6-%(name)s'
+ route_fn_tpl_ipv4 = '%(base)s/network/route-%(name)s'
+ route_fn_tpl_ipv6 = '%(base)s/network/route6-%(name)s'
def __init__(self, route_name, base_sysconf_dir):
super(Route, self).__init__()
@@ -169,7 +169,7 @@ class Route(ConfigMap):
class NetInterface(ConfigMap):
"""Represents a sysconfig/networking-script (and its config + children)."""
- iface_fn_tpl = '%(base)s/network-scripts/ifcfg-%(name)s'
+ iface_fn_tpl = '%(base)s/network/ifcfg-%(name)s'
iface_types = {
'ethernet': 'Ethernet',
@@ -616,12 +616,6 @@ def available(target=None):
if not util.which(p, search=search, target=target):
return False
- expected_paths = [
- 'etc/sysconfig/network-scripts/network-functions',
- 'etc/sysconfig/network-scripts/ifdown-eth']
- for p in expected_paths:
- if not os.path.isfile(util.target_path(target, p)):
- return False
return True