diff options
author | Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr> | 2016-03-31 09:34:43 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2016-04-24 20:58:39 +0200 |
commit | d5e143dcfb007d53aa872dafa968bfb078c9d724 (patch) | |
tree | 2c0efff21cfccbe1db398257ef1945aee461c5e2 /package/busybox | |
parent | 66bdd08a82b4f9a4f8c849bb2484e0776263d83b (diff) |
busybox: Support option 119 in udhcpc default script.
* package/busybox/udhcpc.script: Use $search instead of $domain if
that is defined.
Note that for this to work, not only has CONFIG_FEATURE_UDHCP_RFC3397
be enabled in Busybox' configuration but also the option has to be
requested using the "-O search" command-line option (one can set it in
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS, for instance).
[Peter: add comment with reference to rfc3359/option 119 for clarity]
Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/busybox')
-rwxr-xr-x | package/busybox/udhcpc.script | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script index 50c52e6fe..ad110d3a7 100755 --- a/package/busybox/udhcpc.script +++ b/package/busybox/udhcpc.script @@ -56,7 +56,16 @@ case "$1" in cat $TMPFILE > $RESOLV_CONF rm -f $TMPFILE - [ -n "$domain" ] && echo "search $domain # $interface" >> $RESOLV_CONF + # prefer rfc3359 domain search list (option 119) if available + if [ -n "$search" ]; then + search_list=$search + elif [ -n "$domain" ]; then + search_list=$domain + fi + + [ -n "$search_list" ] && + echo "search $search_list # $interface" >> $RESOLV_CONF + for i in $dns ; do echo adding dns $i echo "nameserver $i # $interface" >> $RESOLV_CONF |