diff options
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/cloud-final.service.tmpl | 1 | ||||
-rwxr-xr-x | systemd/cloud-init-generator.tmpl (renamed from systemd/cloud-init-generator) | 12 | ||||
-rw-r--r-- | systemd/cloud-init.service.tmpl | 7 |
3 files changed, 18 insertions, 2 deletions
diff --git a/systemd/cloud-final.service.tmpl b/systemd/cloud-final.service.tmpl index e2b91255..8207b18c 100644 --- a/systemd/cloud-final.service.tmpl +++ b/systemd/cloud-final.service.tmpl @@ -15,6 +15,7 @@ ExecStart=/usr/bin/cloud-init modules --mode=final RemainAfterExit=yes TimeoutSec=0 KillMode=process +TasksMax=infinity # Output needs to appear in instance console output StandardOutput=journal+console diff --git a/systemd/cloud-init-generator b/systemd/cloud-init-generator.tmpl index bd9f2678..45efa243 100755 --- a/systemd/cloud-init-generator +++ b/systemd/cloud-init-generator.tmpl @@ -1,3 +1,4 @@ +## template:jinja #!/bin/sh set -f @@ -9,7 +10,11 @@ DISABLE="disabled" FOUND="found" NOTFOUND="notfound" RUN_ENABLED_FILE="$LOG_D/$ENABLE" +{% if variant in ["suse"] %} +CLOUD_SYSTEM_TARGET="/usr/lib/systemd/system/cloud-init.target" +{% else %} CLOUD_SYSTEM_TARGET="/lib/systemd/system/cloud-init.target" +{% endif %} CLOUD_TARGET_NAME="cloud-init.target" # lxc sets 'container', but lets make that explicitly a global CONTAINER="${container}" @@ -77,7 +82,12 @@ default() { } check_for_datasource() { - local ds_rc="" dsidentify="/usr/lib/cloud-init/ds-identify" + local ds_rc="" +{% if variant in ["redhat", "fedora", "centos"] %} + local dsidentify="/usr/libexec/cloud-init/ds-identify" +{% else %} + local dsidentify="/usr/lib/cloud-init/ds-identify" +{% endif %} if [ ! -x "$dsidentify" ]; then debug 1 "no ds-identify in $dsidentify. _RET=$FOUND" return 0 diff --git a/systemd/cloud-init.service.tmpl b/systemd/cloud-init.service.tmpl index d8dc393e..9ad3574c 100644 --- a/systemd/cloud-init.service.tmpl +++ b/systemd/cloud-init.service.tmpl @@ -3,6 +3,8 @@ Description=Initial cloud-init job (metadata service crawler) DefaultDependencies=no Wants=cloud-init-local.service +Wants=sshd-keygen.service +Wants=sshd.service After=cloud-init-local.service After=systemd-networkd-wait-online.service {% if variant in ["ubuntu", "unknown", "debian"] %} @@ -10,14 +12,17 @@ After=networking.service {% endif %} {% if variant in ["centos", "fedora", "redhat"] %} After=network.service +After=NetworkManager.service {% endif %} {% if variant in ["suse"] %} -Before=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 {% if variant in ["ubuntu", "unknown", "debian"] %} Before=sysinit.target Conflicts=shutdown.target |