File cloud-init-sysconfig-netpathfix.patch of Package cloud-init.5901
--- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py
@@ -88,8 +88,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__()
@@ -166,7 +166,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',
@@ -602,8 +602,8 @@ def available(target=None):
return False
expected_paths = [
- 'etc/sysconfig/network-scripts/network-functions',
- 'etc/sysconfig/network-scripts/ifdown-eth']
+ 'etc/sysconfig/network/network-functions',
+ 'etc/sysconfig/network/ifdown-eth']
for p in expected_paths:
if not os.path.isfile(util.target_path(target, p)):
return False