[source] netifd: Use -x hostname:$hostname instead of -H

LEDE Commits lede-commits at lists.infradead.org
Thu Jul 28 03:16:05 PDT 2016


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=4a0c4d81510020fe5c426c2e6adf37d396079b05

commit 4a0c4d81510020fe5c426c2e6adf37d396079b05
Author: Merlijn Wajer <merlijn at wizzup.org>
AuthorDate: Wed Jul 20 17:23:52 2016 +0200

    netifd: Use -x hostname:$hostname instead of -H
    
    Passing the hostname is currently broken in since the shipped busybox includes this commit:
    https://git.busybox.net/busybox/commit/networking/udhcp/dhcpc.c?id=2017d48c0d70bef8768efb42909e605ea8eb5a21
    
    Before:
    
        Sun Jan 31 18:11:32 2016 daemon.notice netifd: Interface 'wan' is now down
        Sun Jan 31 18:11:32 2016 daemon.notice netifd: Interface 'wan' is setting up now
        Sun Jan 31 18:11:32 2016 daemon.notice netifd: wan (18158): udhcpc: option -h NAME is deprecated, use -x hostname:NAME
        Sun Jan 31 18:11:32 2016 daemon.notice netifd: wan (18158): udhcpc: malformed hex string 'WR150'
    
    After:
    
        Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): udhcpc (v1.23.2) started
        Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): Sending discover...
        Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): Sending select for xxx.yyy.zzz.xyz...
        Sun Jan 31 18:11:33 2016 daemon.notice netifd: wan (18169): Lease of xxx.yyy.zzz.xyz obtained, lease time 600
    
    Signed-off-by: Merlijn Wajer <merlijn at wizzup.org>
---
 package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 abfdaaf..1d3a209 100755
--- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
@@ -56,7 +56,7 @@ proto_dhcp_setup() {
 		-s /lib/netifd/dhcp.script \
 		-f -t 0 -i "$iface" \
 		${ipaddr:+-r $ipaddr} \
-		${hostname:+-H "$hostname"} \
+		${hostname:+-x "hostname:$hostname"} \
 		${vendorid:+-V "$vendorid"} \
 		$clientid $broadcast $release $dhcpopts
 }



More information about the lede-commits mailing list