diff options
author | William A. Kennington III <wak@google.com> | 2021-12-07 02:26:46 +0300 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2021-12-07 02:31:29 +0300 |
commit | d1a214d0e2516524475ee45ae860d7aa0f2b3e10 (patch) | |
tree | b2153c085b25ee0c4f7d36d79d387e530c17c73e /meta-google/recipes-google/networking | |
parent | b823f89c8cd0da678c78e242bf12c25f414d0697 (diff) | |
download | openbmc-d1a214d0e2516524475ee45ae860d7aa0f2b3e10.tar.xz |
meta-google: gbmc-bridge: Request hostname via DHCP
Change-Id: If3dacbfde966de337702b44b9b06b3eb21755546
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'meta-google/recipes-google/networking')
-rw-r--r-- | meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service | 2 | ||||
-rw-r--r-- | meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh | 5 |
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 145f84b935..7eb0ce0756 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 beccc86586..42a077d093 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 |