From e5a82d5fe658d8c607e10604536ba67bb347b2ae Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 3 May 2007 11:21:26 +0000 Subject: dns_sortlist and dns_options now work as documented, #175367. --- net/system.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'net') diff --git a/net/system.sh b/net/system.sh index 68abc7fe..0d168982 100644 --- a/net/system.sh +++ b/net/system.sh @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 _config_vars="$_config_vars dns_servers dns_domain dns_search" +_config_vars="$_config_vars dns_sortlist dns_options" _config_vars="$_config_vars ntp_servers nis_servers nis_domain" system_depend() { @@ -10,7 +11,7 @@ system_depend() { } _system_dns() { - local servers= domain= search= x= + local servers= domain= search= sortlist= options= x= eval servers=\$dns_servers_${IFVAR} [ -z "${servers}" ] && servers=${dns_servers} @@ -20,8 +21,15 @@ _system_dns() { eval search=\$dns_search_${IFVAR} [ -z "${search}" ] && search=${dns_search} - - [ -z "${servers}" -a -z "${domain}" -a -z "${search}" ] && return 0 + + eval sortlist=\$dns_sortlist_${IFVAR} + [ -z "${sortlist}" ] && sortlist=${dns_sortlist} + + eval options=\$dns_options_${IFVAR} + [ -z "${options}" ] && options=${dns_options} + + [ -z "${servers}" -a -z "${domain}" -a -z "${search}" \ + -a -z "${sortlist}" -a -z "${options}" ] && return 0 local buffer="# Generated by net-scripts for interface ${IFACE}\n" [ -n "${domain}" ] && buffer="${buffer}domain ${domain}\n" @@ -31,6 +39,9 @@ _system_dns() { buffer="${buffer}nameserver ${x}\n" done + [ -n "${sortlist}" ] && buffer="${buffer}sortlist ${sortlist}\n" + [ -n "${options}" ] && buffer="${buffer}options ${options}\n" + # Support resolvconf if we have it. if [ -x /sbin/resolvconf ] ; then printf "${buffer}" | resolvconf -a "${IFACE}" -- cgit v1.2.3