SHA256
1
0
forked from pool/cloud-init
cloud-init/suseSetInitCmd.patch
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

26 lines
938 B
Diff

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