File cloud-init-sysconfig-netpathfix.patch of Package cloud-init.7450
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