forked from pool/cloud-init
- Properly write the routes file for static networks (bnc#920190)
+ modify suseIntegratedHandler.patch - Remove suseSetInitCmd.patch + is now integrated with suseIntegratedHandler.patch OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=35
This commit is contained in:
parent
3ae558cd3d
commit
41dea386e6
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 20 18:27:02 UTC 2015 - rjschwei@suse.com
|
||||
|
||||
- Properly write the routes file for static networks (bnc#920190)
|
||||
+ modify suseIntegratedHandler.patch
|
||||
- Remove suseSetInitCmd.patch
|
||||
+ is now integrated with suseIntegratedHandler.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 27 12:26:32 UTC 2015 - rjschwei@suse.com
|
||||
|
||||
|
@ -35,8 +35,6 @@ Patch3: setupSUSEsysVInit.diff
|
||||
Patch5: openSUSEhostsTemplate.diff
|
||||
# FIXME dynamicInitCmd.patch proposed for upstream merge
|
||||
Patch6: dynamicInitCmd.diff
|
||||
# FIXME suseSetInitCmd.patch send upstream once the SUSE handlers are accepted
|
||||
Patch7: suseSetInitCmd.patch
|
||||
Patch9: cloud-init-no-dmidecode-on-ppc64.patch
|
||||
Patch10: cloud-init-no-user-lock-if-already-locked.patch
|
||||
Patch11: dataSourceOpenNebula.patch
|
||||
@ -134,7 +132,6 @@ Unit tests for the cloud-init tools
|
||||
%patch3 -p1
|
||||
%patch5
|
||||
%patch6
|
||||
%patch7
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p2
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- /dev/null
|
||||
+++ cloudinit/distros/opensuse.py
|
||||
@@ -0,0 +1,209 @@
|
||||
@@ -0,0 +1,221 @@
|
||||
+# vi: ts=4 expandtab
|
||||
+#
|
||||
+# Copyright (C) 2014 SUSE LLC
|
||||
@ -42,8 +42,10 @@
|
||||
+ locale_conf_fn = '/etc/sysconfig/language'
|
||||
+ network_conf_fn = '/etc/sysconfig/network'
|
||||
+ hostname_conf_fn = '/etc/HOSTNAME'
|
||||
+ init_cmd = ['service']
|
||||
+ 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'
|
||||
+
|
||||
@ -53,9 +55,13 @@
|
||||
+ # calls from repeatly happening (when they
|
||||
+ # should only happen say once per instance...)
|
||||
+ self._runner = helpers.Runners(paths)
|
||||
+ cfg['ssh_svcname'] = 'sshd'
|
||||
+ self.osfamily = 'suse'
|
||||
+ self.systemdDist = util.which('systemctl')
|
||||
+
|
||||
+ if self.systemdDist:
|
||||
+ self.init_cmd = ['systemctl']
|
||||
+ cfg['ssh_svcname'] = 'sshd.service'
|
||||
+
|
||||
+ def apply_locale(self, locale, out_fn=None):
|
||||
+ if self.systemdDist:
|
||||
+ if not out_fn:
|
||||
@ -176,15 +182,18 @@
|
||||
+ dev_names = entries.keys()
|
||||
+ for (dev, info) in entries.iteritems():
|
||||
+ net_fn = self.network_script_tpl % (dev)
|
||||
+ route_fn = self.route_conf_tpl % (dev)
|
||||
+ mode = None
|
||||
+ if info.get('auto', None):
|
||||
+ mode = 'auto'
|
||||
+ else:
|
||||
+ mode = 'manual'
|
||||
+ bootproto = info.get('bootproto', None)
|
||||
+ gateway = info.get('gateway', None)
|
||||
+ net_cfg = {
|
||||
+ 'BOOTPROTO': info.get('bootproto'),
|
||||
+ 'BOOTPROTO': bootproto,
|
||||
+ 'BROADCAST': info.get('broadcast'),
|
||||
+ 'GATEWAY': info.get('gateway'),
|
||||
+ 'GATEWAY': gateway,
|
||||
+ 'IPADDR': info.get('address'),
|
||||
+ 'LLADDR': info.get('hwaddress'),
|
||||
+ 'NETMASK': info.get('netmask'),
|
||||
@ -196,6 +205,9 @@
|
||||
+ else:
|
||||
+ net_cfg['FIREWALL'] = 'no'
|
||||
+ rhutil.update_sysconfig_file(net_fn, net_cfg, True)
|
||||
+ if gateway and bootproto == 'static':
|
||||
+ default_route = 'default %s' %gateway
|
||||
+ util.write_file(route_fn, default_route, 0644)
|
||||
+ if 'dns-nameservers' in info:
|
||||
+ nameservers.extend(info['dns-nameservers'])
|
||||
+ if 'dns-search' in info:
|
||||
|
@ -1,25 +0,0 @@
|
||||
--- cloudinit/distros/opensuse.py.orig
|
||||
+++ cloudinit/distros/opensuse.py
|
||||
@@ -43,6 +43,7 @@ class Distro(distros.Distro):
|
||||
resolve_conf_fn = '/etc/resolv.conf'
|
||||
tz_local_fn = '/etc/localtime'
|
||||
systemd_locale_conf_fn = '/etc/locale.conf'
|
||||
+ init_cmd = ['service']
|
||||
|
||||
def __init__(self, name, cfg, paths):
|
||||
distros.Distro.__init__(self, name, cfg, paths)
|
||||
@@ -50,9 +51,13 @@ class Distro(distros.Distro):
|
||||
# calls from repeatly happening (when they
|
||||
# should only happen say once per instance...)
|
||||
self._runner = helpers.Runners(paths)
|
||||
+ cfg['ssh_svcname'] = 'sshd'
|
||||
self.osfamily = 'suse'
|
||||
self.systemdDist = util.which('systemctl')
|
||||
-
|
||||
+ if self.systemdDist:
|
||||
+ self.init_cmd = ['systemctl']
|
||||
+ cfg['ssh_svcname'] = 'sshd.service'
|
||||
+
|
||||
def apply_locale(self, locale, out_fn=None):
|
||||
if self.systemdDist:
|
||||
if not out_fn:
|
Loading…
Reference in New Issue
Block a user