summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'systemd')
-rw-r--r--systemd/cloud-config.service2
-rw-r--r--systemd/cloud-final.service2
-rw-r--r--systemd/cloud-init-local.service2
-rw-r--r--systemd/cloud-init.service2
-rw-r--r--systemd/cloud-init.target16
5 files changed, 20 insertions, 4 deletions
diff --git a/systemd/cloud-config.service b/systemd/cloud-config.service
index f9f1996e..45d2a63b 100644
--- a/systemd/cloud-config.service
+++ b/systemd/cloud-config.service
@@ -13,4 +13,4 @@ TimeoutSec=0
StandardOutput=journal+console
[Install]
-WantedBy=multi-user.target
+WantedBy=cloud-init.target
diff --git a/systemd/cloud-final.service b/systemd/cloud-final.service
index bcbdd36f..bfb08d4a 100644
--- a/systemd/cloud-final.service
+++ b/systemd/cloud-final.service
@@ -14,4 +14,4 @@ KillMode=process
StandardOutput=journal+console
[Install]
-WantedBy=multi-user.target
+WantedBy=cloud-init.target
diff --git a/systemd/cloud-init-local.service b/systemd/cloud-init-local.service
index a31985c6..73aa46f6 100644
--- a/systemd/cloud-init-local.service
+++ b/systemd/cloud-init-local.service
@@ -13,4 +13,4 @@ TimeoutSec=0
StandardOutput=journal+console
[Install]
-WantedBy=multi-user.target
+WantedBy=cloud-init.target
diff --git a/systemd/cloud-init.service b/systemd/cloud-init.service
index 48920283..1f656f7f 100644
--- a/systemd/cloud-init.service
+++ b/systemd/cloud-init.service
@@ -15,4 +15,4 @@ TimeoutSec=0
StandardOutput=journal+console
[Install]
-WantedBy=multi-user.target
+WantedBy=cloud-init.target
diff --git a/systemd/cloud-init.target b/systemd/cloud-init.target
new file mode 100644
index 00000000..03f61002
--- /dev/null
+++ b/systemd/cloud-init.target
@@ -0,0 +1,16 @@
+# cloud-init target is enabled by cloud-init-generator
+# To disable it you can either:
+# a.) boot with kernel cmdline of 'cloudinit=disabled'
+# b.) touch a file /etc/cloud/cloud-init.disabled
+# cloud-init normally emits a "cloud-config" upstart event to inform third
+# parties that cloud-config is available, which does us no good when we're
+# using systemd. cloud-config.target serves as this synchronization point
+# instead. Services that would "start on cloud-config" with upstart can
+# instead use "After=cloud-config.target" and "Wants=cloud-config.target"
+# as appropriate.
+
+[Unit]
+Description=Cloud-init target
+Wants=cloud-init-local.service cloud-init.service
+After=cloud-init-local.service cloud-init.service
+