diff --git a/cloud-init-sysconfig-netpathfix.patch b/cloud-init-sysconfig-netpathfix.patch new file mode 100644 index 0000000..8c9c716 --- /dev/null +++ b/cloud-init-sysconfig-netpathfix.patch @@ -0,0 +1,20 @@ +--- cloudinit/net/sysconfig.py.orig ++++ cloudinit/net/sysconfig.py +@@ -94,7 +94,7 @@ class ConfigMap(object): + class Route(ConfigMap): + """Represents a route configuration.""" + +- route_fn_tpl = '%(base)s/network-scripts/route-%(name)s' ++ route_fn_tpl = '%(base)s/network/route-%(name)s' + + def __init__(self, route_name, base_sysconf_dir): + super(Route, self).__init__() +@@ -119,7 +119,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', diff --git a/cloud-init.changes b/cloud-init.changes index 973312b..4c064f2 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 31 12:44:21 UTC 2016 - rjschwei@suse.com + +- Add cloud-init-sysconfig-netpathfix.patch (bsc#1007529) + + Fix the default path for network scripts +- Cosmetic changes to suseIntegratedHandler.patch + ------------------------------------------------------------------- Sat Oct 29 13:24:13 UTC 2016 - rjschwei@suse.com diff --git a/cloud-init.spec b/cloud-init.spec index c79d453..310ff02 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -49,6 +49,7 @@ Patch23: cloud-init-fix-unicode-handling-binarydecode.patch Patch24: cloud-init-handle-no-carrier.patch Patch25: cloud-init-digital-ocean-datasource.patch Patch26: cloud-init-digital-ocean-datasource-enable-by-default.patch +Patch27: cloud-init-sysconfig-netpathfix.patch BuildRequires: fdupes BuildRequires: filesystem BuildRequires: python-devel @@ -174,6 +175,7 @@ Unit tests for the cloud-init tools %patch24 %patch25 -p1 %patch26 -p1 +%patch27 %if 0%{?suse_version} <= 1130 # disable ecdsa for SLE 11 (not available) diff --git a/suseIntegratedHandler.patch b/suseIntegratedHandler.patch index 83d956a..b8d92cd 100644 --- a/suseIntegratedHandler.patch +++ b/suseIntegratedHandler.patch @@ -41,20 +41,20 @@ + +class Distro(distros.Distro): + clock_conf_fn = '/etc/sysconfig/clock' -+ locale_conf_fn = '/etc/sysconfig/language' -+ network_conf_fn = '/etc/sysconfig/network' + hostname_conf_fn = '/etc/HOSTNAME' + init_cmd = ['service'] ++ locale_conf_fn = '/etc/sysconfig/language' ++ network_conf_fn = '/etc/sysconfig/network' + network_script_tpl = '/etc/sysconfig/network/ifcfg-%s' + resolve_conf_fn = '/etc/resolv.conf' + route_conf_tpl = '/etc/sysconfig/network/ifroute-%s' -+ tz_local_fn = '/etc/localtime' -+ systemd_locale_conf_fn = '/etc/locale.conf' + systemd_hostname_conf_fn = '/etc/hostname' ++ systemd_locale_conf_fn = '/etc/locale.conf' ++ tz_local_fn = '/etc/localtime' + + def __init__(self, name, cfg, paths): + distros.Distro.__init__(self, name, cfg, paths) -+ self._net_renderer = sysconfig.Renderer() ++ self._net_renderer = sysconfig.Renderer() + # This will be used to restrict certain + # calls from repeatly happening (when they + # should only happen say once per instance...) @@ -153,9 +153,9 @@ + return conf + + def _read_system_hostname(self): -+ if self.systemdDist: -+ host_fn = self.systemd_hostname_conf_fn -+ else: ++ if self.systemdDist: ++ host_fn = self.systemd_hostname_conf_fn ++ else: + host_fn = self.hostname_conf_fn + return (host_fn, self._read_hostname(host_fn)) +