SHA256
1
0
forked from pool/cloud-init
cloud-init/dynamicInitCmd.diff
Robert Schweikert 7e9476e0dc - add more dependencies to ensure commands used by the scripts are present
- add dynamicInitCmd.diff
  + support diffirent init systems across distribution versions for
    service restart
- add suseSetInitCmd.patch
  + properly setup the init command to support proper service restart

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=14
2014-06-24 19:29:50 +00:00

28 lines
1020 B
Diff

=== modified file 'cloudinit/config/cc_set_passwords.py'
--- cloudinit/config/cc_set_passwords.py 2014-02-06 21:38:30 +0000
+++ cloudinit/config/cc_set_passwords.py 2014-06-24 18:39:33 +0000
@@ -136,7 +136,7 @@
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
=== modified file 'cloudinit/distros/__init__.py'
--- cloudinit/distros/__init__.py 2014-02-12 19:56:55 +0000
+++ cloudinit/distros/__init__.py 2014-06-24 18:39:33 +0000
@@ -79,6 +79,9 @@
" 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)