[OpenWrt-Devel] [netifd][PATCH v3] proto-shell: add hostname validation check for netifd dhcp script
tymon.huang
banglang.huang at foxmail.com
Fri Aug 21 03:12:52 EDT 2015
This patch can fix the issue that luci web shows '?' sign when WAN port work on DHCP-client mode without
setting hostname. After adding the hostname check, the udhcpc can work with '-H' parameter correctly and
send hostname to dhcp server.
Signed-off-by: tymon.huang <banglang.huang at foxmail.com>
---
package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
index 0e88af9..bf91c29 100755
--- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
@@ -47,6 +47,7 @@ proto_dhcp_setup() {
[ -n "$mtu6rd" ] && proto_export "MTU6RD=$mtu6rd"
[ -n "$customroutes" ] && proto_export "CUSTOMROUTES=$customroutes"
[ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0"
+ [ -z "$hostname" ] && hostname="$(uci_get system @system[0] hostname OpenWrt)"
proto_export "INTERFACE=$config"
proto_run_command "$config" udhcpc \
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list