summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-09-11 23:14:23 +0200
committerDaniil Baturin <daniil@baturin.org>2019-09-11 23:14:23 +0200
commit59e5e64cfbb67a5eb1a9d4d21dd54d946897b8d7 (patch)
treef7d794e3f3b4b90355f0e1c5c9306096f2615106 /src/systemd
parentd34fd745438951d55c5c4899b2b3c7bfa5d08026 (diff)
downloadvyos-1x-59e5e64cfbb67a5eb1a9d4d21dd54d946897b8d7.tar.gz
vyos-1x-59e5e64cfbb67a5eb1a9d4d21dd54d946897b8d7.zip
T1598: annotate the vyos-hostsd unit file.
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/vyos-hostsd.service12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/systemd/vyos-hostsd.service b/src/systemd/vyos-hostsd.service
index 2444f5352..731e570c9 100644
--- a/src/systemd/vyos-hostsd.service
+++ b/src/systemd/vyos-hostsd.service
@@ -1,6 +1,12 @@
[Unit]
Description=VyOS DNS configuration keeper
+
+# Without this option, lots of default dependencies are added,
+# among them network.target, which creates a dependency cycle
DefaultDependencies=no
+
+# Seemingly sensible way to say "as early as the system is ready"
+# All vyos-hostsd needs is read/write mounted root
After=systemd-remount-fs.service
[Service]
@@ -13,9 +19,13 @@ SyslogFacility=daemon
Restart=on-failure
-# Does't work but leave it here
+# Does't work in Jessie but leave it here
User=root
Group=vyattacfg
[Install]
+
+# Note: After= doesn't actually create a dependency,
+# it just sets order for the case when both services are to start,
+# and without RequiredBy it *does not* set vyos-hostsd to start.
RequiredBy=cloud-init-local.service vyos-router.service