From 0451a9f60960da56e3af4f97bbcece3d98482f86 Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Thu, 21 Sep 2017 07:38:48 -0400 Subject: suse: updates to templates to support openSUSE and SLES. Things done here: - identify 'suse' as a variant in util.system_info and also tools/render-cloudcfg. - update systemd and cloud.cfg templates for suse specific changes. LP: #1718640 --- systemd/cloud-init-local.service.tmpl | 6 ++++++ systemd/cloud-init.service.tmpl | 10 ++++++++++ 2 files changed, 16 insertions(+) (limited to 'systemd') diff --git a/systemd/cloud-init-local.service.tmpl b/systemd/cloud-init-local.service.tmpl index ff9c644d..bf6b2961 100644 --- a/systemd/cloud-init-local.service.tmpl +++ b/systemd/cloud-init-local.service.tmpl @@ -13,6 +13,12 @@ Before=shutdown.target Before=sysinit.target Conflicts=shutdown.target {% endif %} +{% if variant in ["suse"] %} +# Other distros use Before=sysinit.target. There is not a clearly identified +# reason for usage of basic.target instead. +Before=basic.target +Conflicts=shutdown.target +{% endif %} RequiresMountsFor=/var/lib/cloud [Service] diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl index 2c71889d..b92e8abc 100644 --- a/systemd/cloud-init.service.tmpl +++ b/systemd/cloud-init.service.tmpl @@ -13,6 +13,13 @@ After=networking.service {% if variant in ["centos", "fedora", "redhat"] %} After=network.service {% endif %} +{% if variant in ["suse"] %} +Requires=wicked.service +After=wicked.service +# setting hostname via hostnamectl depends on dbus, which otherwise +# would not be guaranteed at this point. +After=dbus.service +{% endif %} Before=network-online.target Before=sshd-keygen.service Before=sshd.service @@ -20,6 +27,9 @@ Before=sshd.service Before=sysinit.target Conflicts=shutdown.target {% endif %} +{% if variant in ["suse"] %} +Conflicts=shutdown.target +{% endif %} Before=systemd-user-sessions.service [Service] -- cgit v1.2.3