2014-06-24 21:29:50 +02:00
|
|
|
=== modified file 'cloudinit/config/cc_set_passwords.py'
|
2017-02-27 12:56:24 +01:00
|
|
|
Index: cloudinit/config/cc_set_passwords.py
|
|
|
|
===================================================================
|
|
|
|
--- cloudinit/config/cc_set_passwords.py.orig
|
|
|
|
+++ cloudinit/config/cc_set_passwords.py
|
|
|
|
@@ -147,7 +147,7 @@ def handle(_name, cfg, cloud, log, args)
|
2014-06-24 21:29:50 +02:00
|
|
|
util.write_file(ssh_util.DEF_SSHD_CFG, "\n".join(lines))
|
|
|
|
|
|
|
|
try:
|
|
|
|
- cmd = cloud.distro.init_cmd # Default service
|
|
|
|
+ cmd = cloud.distro.get_init_cmd()
|
|
|
|
cmd.append(cloud.distro.get_option('ssh_svcname', 'ssh'))
|
|
|
|
cmd.append('restart')
|
|
|
|
if 'systemctl' in cmd: # Switch action ordering
|
2017-02-27 12:56:24 +01:00
|
|
|
Index: cloudinit/distros/__init__.py
|
|
|
|
===================================================================
|
|
|
|
--- cloudinit/distros/__init__.py.orig
|
|
|
|
+++ cloudinit/distros/__init__.py
|
|
|
|
@@ -88,6 +88,9 @@ class Distro(object):
|
2014-06-24 21:29:50 +02:00
|
|
|
" no file found at %s") % (tz, tz_file))
|
|
|
|
return tz_file
|
|
|
|
|
|
|
|
+ def get_init_cmd(self):
|
|
|
|
+ return self.init_cmd
|
|
|
|
+
|
|
|
|
def get_option(self, opt_name, default=None):
|
|
|
|
return self._cfg.get(opt_name, default)
|
|
|
|
|