ncsid: Stop targets when daemon stops
We want to make sure dhcp clients and neighbor updaters stop if the ncsi
daemon is stopped.
Change-Id: I5a5a0d412621591d3725425110d55d5804b31a0f
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/subprojects/ncsid/src/nic-hostful@.target b/subprojects/ncsid/src/nic-hostful@.target
index d4f69bf..0d2d231 100644
--- a/subprojects/ncsid/src/nic-hostful@.target
+++ b/subprojects/ncsid/src/nic-hostful@.target
@@ -1,3 +1,5 @@
[Unit]
Description=Target when nic enters mode with host
Conflicts=nic-hostless@%i.target
+BindsTo=ncsid@%i.service
+After=ncsid@%i.service
diff --git a/subprojects/ncsid/src/nic-hostless@.target b/subprojects/ncsid/src/nic-hostless@.target
index 6ef66fb..3d9b496 100644
--- a/subprojects/ncsid/src/nic-hostless@.target
+++ b/subprojects/ncsid/src/nic-hostless@.target
@@ -1,6 +1,8 @@
[Unit]
Description=Target when nic enters mode without host
Conflicts=nic-hostful@%i.target
+BindsTo=ncsid@%i.service
+After=ncsid@%i.service
Wants=dhcp4@%i.service
Wants=dhcp6@%i.service
Wants=update-static-neighbors@%i.service