meta-google: networking: Remove systemd daemon-reload
The daemon-reload operation is particularly expensive on the init
manager during bootup and ends up re-triggering services unnecessarily
that cause the system to become more flaky. We can avoid this by using
enviornment files, as they get re-read every time the service is
started.
Tested: Ran on a machine with and without a smartnic to verify the
arguments to the daemons are correct in both instances.
Change-Id: Ib3e554d12a7a3ce379f449bcae3532314b06821c
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-dhcrelay.service.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-dhcrelay.service.in
index 078d1e2..c085cbc 100644
--- a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-dhcrelay.service.in
+++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-dhcrelay.service.in
@@ -7,9 +7,11 @@
LogRateLimitBurst=100
[Service]
+Environment="RP_FLAG=-rp 3967"
+EnvironmentFile=-/run/gbmc-ncsi-dhcrelay.env
Restart=always
RestartSec=5
-ExecStart=/usr/sbin/dhcrelay -d --no-pid -rp 3967 -l gbmcncsidhcp -u ff02::1:2%%@NCSI_IF@
+ExecStart=/usr/sbin/dhcrelay -d --no-pid $RP_FLAG -l gbmcncsidhcp -u ff02::1:2%%@NCSI_IF@
[Install]
WantedBy=multi-user.target