forked from pool/cloud-init
Accepting request 308957 from Cloud:Tools
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/308957 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=22
This commit is contained in:
commit
4e2670406e
@ -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
|
Mon Apr 27 12:26:32 UTC 2015 - rjschwei@suse.com
|
||||||
|
|
||||||
|
@ -35,8 +35,6 @@ Patch3: setupSUSEsysVInit.diff
|
|||||||
Patch5: openSUSEhostsTemplate.diff
|
Patch5: openSUSEhostsTemplate.diff
|
||||||
# FIXME dynamicInitCmd.patch proposed for upstream merge
|
# FIXME dynamicInitCmd.patch proposed for upstream merge
|
||||||
Patch6: dynamicInitCmd.diff
|
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
|
Patch9: cloud-init-no-dmidecode-on-ppc64.patch
|
||||||
Patch10: cloud-init-no-user-lock-if-already-locked.patch
|
Patch10: cloud-init-no-user-lock-if-already-locked.patch
|
||||||
Patch11: dataSourceOpenNebula.patch
|
Patch11: dataSourceOpenNebula.patch
|
||||||
@ -134,7 +132,6 @@ Unit tests for the cloud-init tools
|
|||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch5
|
%patch5
|
||||||
%patch6
|
%patch6
|
||||||
%patch7
|
|
||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
%patch11 -p2
|
%patch11 -p2
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ cloudinit/distros/opensuse.py
|
+++ cloudinit/distros/opensuse.py
|
||||||
@@ -0,0 +1,209 @@
|
@@ -0,0 +1,221 @@
|
||||||
+# vi: ts=4 expandtab
|
+# vi: ts=4 expandtab
|
||||||
+#
|
+#
|
||||||
+# Copyright (C) 2014 SUSE LLC
|
+# Copyright (C) 2014 SUSE LLC
|
||||||
@ -42,8 +42,10 @@
|
|||||||
+ locale_conf_fn = '/etc/sysconfig/language'
|
+ locale_conf_fn = '/etc/sysconfig/language'
|
||||||
+ network_conf_fn = '/etc/sysconfig/network'
|
+ network_conf_fn = '/etc/sysconfig/network'
|
||||||
+ hostname_conf_fn = '/etc/HOSTNAME'
|
+ hostname_conf_fn = '/etc/HOSTNAME'
|
||||||
|
+ init_cmd = ['service']
|
||||||
+ network_script_tpl = '/etc/sysconfig/network/ifcfg-%s'
|
+ network_script_tpl = '/etc/sysconfig/network/ifcfg-%s'
|
||||||
+ resolve_conf_fn = '/etc/resolv.conf'
|
+ resolve_conf_fn = '/etc/resolv.conf'
|
||||||
|
+ route_conf_tpl = '/etc/sysconfig/network/ifroute-%s'
|
||||||
+ tz_local_fn = '/etc/localtime'
|
+ tz_local_fn = '/etc/localtime'
|
||||||
+ systemd_locale_conf_fn = '/etc/locale.conf'
|
+ systemd_locale_conf_fn = '/etc/locale.conf'
|
||||||
+
|
+
|
||||||
@ -53,9 +55,13 @@
|
|||||||
+ # calls from repeatly happening (when they
|
+ # calls from repeatly happening (when they
|
||||||
+ # should only happen say once per instance...)
|
+ # should only happen say once per instance...)
|
||||||
+ self._runner = helpers.Runners(paths)
|
+ self._runner = helpers.Runners(paths)
|
||||||
|
+ cfg['ssh_svcname'] = 'sshd'
|
||||||
+ self.osfamily = 'suse'
|
+ self.osfamily = 'suse'
|
||||||
+ self.systemdDist = util.which('systemctl')
|
+ 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):
|
+ def apply_locale(self, locale, out_fn=None):
|
||||||
+ if self.systemdDist:
|
+ if self.systemdDist:
|
||||||
+ if not out_fn:
|
+ if not out_fn:
|
||||||
@ -176,15 +182,18 @@
|
|||||||
+ dev_names = entries.keys()
|
+ dev_names = entries.keys()
|
||||||
+ for (dev, info) in entries.iteritems():
|
+ for (dev, info) in entries.iteritems():
|
||||||
+ net_fn = self.network_script_tpl % (dev)
|
+ net_fn = self.network_script_tpl % (dev)
|
||||||
|
+ route_fn = self.route_conf_tpl % (dev)
|
||||||
+ mode = None
|
+ mode = None
|
||||||
+ if info.get('auto', None):
|
+ if info.get('auto', None):
|
||||||
+ mode = 'auto'
|
+ mode = 'auto'
|
||||||
+ else:
|
+ else:
|
||||||
+ mode = 'manual'
|
+ mode = 'manual'
|
||||||
|
+ bootproto = info.get('bootproto', None)
|
||||||
|
+ gateway = info.get('gateway', None)
|
||||||
+ net_cfg = {
|
+ net_cfg = {
|
||||||
+ 'BOOTPROTO': info.get('bootproto'),
|
+ 'BOOTPROTO': bootproto,
|
||||||
+ 'BROADCAST': info.get('broadcast'),
|
+ 'BROADCAST': info.get('broadcast'),
|
||||||
+ 'GATEWAY': info.get('gateway'),
|
+ 'GATEWAY': gateway,
|
||||||
+ 'IPADDR': info.get('address'),
|
+ 'IPADDR': info.get('address'),
|
||||||
+ 'LLADDR': info.get('hwaddress'),
|
+ 'LLADDR': info.get('hwaddress'),
|
||||||
+ 'NETMASK': info.get('netmask'),
|
+ 'NETMASK': info.get('netmask'),
|
||||||
@ -196,6 +205,9 @@
|
|||||||
+ else:
|
+ else:
|
||||||
+ net_cfg['FIREWALL'] = 'no'
|
+ net_cfg['FIREWALL'] = 'no'
|
||||||
+ rhutil.update_sysconfig_file(net_fn, net_cfg, True)
|
+ 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:
|
+ if 'dns-nameservers' in info:
|
||||||
+ nameservers.extend(info['dns-nameservers'])
|
+ nameservers.extend(info['dns-nameservers'])
|
||||||
+ if 'dns-search' in info:
|
+ 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