SHA256
1
0
forked from pool/cloud-init

- Add cloud-init-sysconfig-netpathfix.patch (bsc#1007529)

+ Fix the default path for network scripts
- Cosmetic changes to suseIntegratedHandler.patch

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=64
This commit is contained in:
Robert Schweikert 2016-10-31 12:45:48 +00:00 committed by Git OBS Bridge
parent 886d58922f
commit 4eeb8d512a
4 changed files with 37 additions and 8 deletions

View File

@ -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',

View File

@ -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

View File

@ -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)

View File

@ -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))
+