summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service2
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh5
2 files changed, 6 insertions, 1 deletions
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 145f84b93..7eb0ce075 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
@@ -7,7 +7,7 @@ StartLimitBurst=3
[Service]
Restart=always
RestartSec=5
-ExecStart=/usr/bin/udhcpc6 -f -q -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 gbmcbr -s /usr/libexec/gbmc-br-dhcp.sh
[Install]
WantedBy=multi-user.target
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh
index beccc8658..42a077d09 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh
@@ -92,5 +92,10 @@ EOF
networkctl reload && networkctl reconfigure gbmcbr
fi
+ if [ -n "${fqdn-}" ]; then
+ echo "Using hostname $fqdn" >&2
+ hostnamectl set-hostname "$fqdn" || true
+ fi
+
gbmc_br_dhcp_run_hooks
fi