SHA256
1
0
forked from pool/cloud-init
cloud-init/suseSetInitCmd.patch

26 lines
938 B
Diff
Raw Normal View History

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