summaryrefslogtreecommitdiff
diff options
authorMichael Vogt <mvo@ubuntu.com>2018-07-04 11:39:32 +0200
committerMichael Vogt <mvo@ubuntu.com>2018-07-04 11:42:19 +0200
commitbe264fc2805f1bb771d6096cc98990a60d6dc0d6 (patch)
tree91b5e4d7d6fa1d60cf83f381b469884f6e03951c
parent34562bcfdcdb797350347b902ae7f94a0344e18b (diff)
systemd: add snapd.target to pull snapd out of multi-user.targetsnapd-seeded-slow
-rw-r--r--data/systemd/Makefile2
-rw-r--r--data/systemd/snapd.seeded.service.in2
-rw-r--r--data/systemd/snapd.service.in2
-rw-r--r--data/systemd/snapd.target5
4 files changed, 8 insertions, 3 deletions
diff --git a/data/systemd/Makefile b/data/systemd/Makefile
index 050c6cbc34..fd6f4d504e 100644
--- a/data/systemd/Makefile
+++ b/data/systemd/Makefile
@@ -21,7 +21,7 @@ SYSTEMDSYSTEMUNITDIR := /lib/systemd/system
SYSTEMD_UNITS_GENERATED := $(wildcard *.in)
# NOTE: sort removes duplicates so this gives us all the units, generated or otherwise
-SYSTEMD_UNITS = $(sort $(SYSTEMD_UNITS_GENERATED:.in=) $(wildcard *.service) $(wildcard *.timer) $(wildcard *.socket))
+SYSTEMD_UNITS = $(sort $(SYSTEMD_UNITS_GENERATED:.in=) $(wildcard *.service) $(wildcard *.timer) $(wildcard *.socket) $(wildcard *.target))
.PHONY: all
all: $(SYSTEMD_UNITS) check
diff --git a/data/systemd/snapd.seeded.service.in b/data/systemd/snapd.seeded.service.in
index 4fa3ff10bb..9c3475eb3c 100644
--- a/data/systemd/snapd.seeded.service.in
+++ b/data/systemd/snapd.seeded.service.in
@@ -9,5 +9,5 @@ ExecStart=@bindir@/snap wait system seed.loaded
RemainAfterExit=true
[Install]
-WantedBy=multi-user.target cloud-final.service
+WantedBy=snapd.target
diff --git a/data/systemd/snapd.service.in b/data/systemd/snapd.service.in
index cb00c9e823..cfe6e0444b 100644
--- a/data/systemd/snapd.service.in
+++ b/data/systemd/snapd.service.in
@@ -13,4 +13,4 @@ Restart=always
Type=notify
[Install]
-WantedBy=multi-user.target
+WantedBy=snapd.target
diff --git a/data/systemd/snapd.target b/data/systemd/snapd.target
new file mode 100644
index 0000000000..14b5f3f361
--- /dev/null
+++ b/data/systemd/snapd.target
@@ -0,0 +1,5 @@
+[Unit]
+Description=Snapd fully seeded target
+Requires=basic.target
+After=basic.target
+AllowIsolate=yes