diff options
author | Steven Barth <steven@midlink.org> | 2013-10-17 12:55:40 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-10-17 12:55:40 +0000 |
commit | b8574ae0b511c4dba4feb57ebc4547d836844fed (patch) | |
tree | 0a511bd598586b8c21a597bc9535b826d26523e7 /package | |
parent | dda74d14d1b0a6731fed645e06746b00f6cfed68 (diff) | |
download | upstream-b8574ae0b511c4dba4feb57ebc4547d836844fed.tar.gz upstream-b8574ae0b511c4dba4feb57ebc4547d836844fed.tar.bz2 upstream-b8574ae0b511c4dba4feb57ebc4547d836844fed.zip |
Added 'customopts' dhcp protocol option, which is an array passed along to udhcpc as series of -x options.
Signed-off-by: Markus Stenberg <markus.stenberg@iki.fi>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38436 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-x | package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 9 |
1 files changed, 7 insertions, 2 deletions
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 a270c681d7..1e0aa68881 100755 --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh @@ -13,20 +13,25 @@ proto_dhcp_init_config() { proto_config_add_boolean "broadcast" proto_config_add_string "reqopts" proto_config_add_string "iface6rd" + proto_config_add_string "customopts" } proto_dhcp_setup() { local config="$1" local iface="$2" - local ipaddr hostname clientid vendorid broadcast reqopts iface6rd - json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd + local ipaddr hostname clientid vendorid broadcast reqopts iface6rd customopts + json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd customopts local opt dhcpopts for opt in $reqopts; do append dhcpopts "-O $opt" done + for opt in $customopts; do + append dhcpopts "-x $opt" + done + [ "$broadcast" = 1 ] && broadcast="-B" || broadcast= [ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C" [ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd" |