summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <peter@korsgaard.com>2018-10-30 17:16:14 (GMT)
committerPeter Korsgaard <peter@korsgaard.com>2018-11-05 22:20:55 (GMT)
commit7a3f85ddff33c9c02ee04f1f9aaf5d5c7a9bac45 (patch)
tree367a26d2e71290a82a9bc25859b5bae2a36ec3b6
parent16db3937c09e6aaa914e3e05f8472323e2e088a8 (diff)
downloadbuildroot-7a3f85ddff33c9c02ee04f1f9aaf5d5c7a9bac45.tar.gz
buildroot-7a3f85ddff33c9c02ee04f1f9aaf5d5c7a9bac45.tar.bz2
ifupdown-script: send current hostname in DHCP request
For the default (BR2_SYSTEM_DHCP) /etc/network/interfaces handling. Both the "big" and busybox ifupdown variants pass the hostname argument to the DHCP client through the shell, so we can use $() to expand to the current hostname value. Notice that this may not be handled by all DHCP clients. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/ifupdown-scripts/ifupdown-scripts.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/package/ifupdown-scripts/ifupdown-scripts.mk b/package/ifupdown-scripts/ifupdown-scripts.mk
index ebc89b3..17364ae 100644
--- a/package/ifupdown-scripts/ifupdown-scripts.mk
+++ b/package/ifupdown-scripts/ifupdown-scripts.mk
@@ -23,6 +23,7 @@ define IFUPDOWN_SCRIPTS_DHCP
echo "iface $(IFUPDOWN_SCRIPTS_DHCP_IFACE) inet dhcp"; \
echo " pre-up /etc/network/nfs_check"; \
echo " wait-delay 15"; \
+ echo " hostname \$$(hostname)"; \
) >> $(TARGET_DIR)/etc/network/interfaces
$(INSTALL) -m 0755 -D $(IFUPDOWN_SCRIPTS_PKGDIR)/nfs_check \
$(TARGET_DIR)/etc/network/nfs_check