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/networking/gbmc-bridge/gbmc-br-dhcp.service b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service
index c361181..48f53ab 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service
@@ -6,10 +6,12 @@
StartLimitBurst=3
[Service]
+Environment=INTF=gbmcbr
+EnvironmentFile=-/run/gbmc-br-dhcp.env
Restart=on-failure
RestartSec=5
ExecStartPre=/usr/bin/update-dhcp-status 'ONGOING' 'Starting dhcp process'
-ExecStart=/usr/bin/udhcpc6 -f -q -O fqdn -O bootfile_url -O bootfile_param -i gbmcbr -s /usr/libexec/gbmc-br-dhcp.sh
+ExecStart=/usr/bin/udhcpc6 -f -q -O fqdn -O bootfile_url -O bootfile_param -i $INTF -s /usr/libexec/gbmc-br-dhcp.sh
[Install]
WantedBy=multi-user.target