/[baselayout]/branches/baselayout-1_12/net-scripts/net.modules.d/system
Gentoo

Diff of /branches/baselayout-1_12/net-scripts/net.modules.d/system

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1317 Revision 1318
33 33
34# char* ifconfig_get_vars(char *interface) 34# char* ifconfig_get_vars(char *interface)
35# 35#
36# Returns a string spaced with possible user set configuration variables 36# Returns a string spaced with possible user set configuration variables
37system_get_vars() { 37system_get_vars() {
38 echo "dns_servers_$1 dns_domain_$1 dns_search_domains_$1 ntp_servers_$1 nis_domain_$1 nis_servers_$1" 38 echo "dns_servers_$1 dns_domain_$1 dns_search_path_$1 ntp_servers_$1 nis_domain_$1 nis_servers_$1"
39} 39}
40 40
41system_dns() { 41system_dns() {
42 local iface="$1" ifvar=$( bash_variable "$1" ) x 42 local iface="$1" ifvar=$( bash_variable "$1" ) x
43 local conffile="${statedir}/${iface}/resolv.conf" tmpfile="${conffile}.$$" 43 local conffile="${statedir}/${iface}/resolv.conf" tmpfile="${conffile}.$$"
55 55
56 for x in ${servers[@]}; do 56 for x in ${servers[@]}; do
57 echo "nameserver ${x}" >> "${tmpfile}" 57 echo "nameserver ${x}" >> "${tmpfile}"
58 done 58 done
59 59
60 eval x=\"\$\{dns_search_domains_${ifvar}\}\" 60 eval x=\"\$\{dns_search_path_${ifvar}\}\"
61 [[ -n ${x} ]] && echo "search ${x}" >> "${tmpfile}" 61 [[ -n ${x} ]] && echo "search ${x}" >> "${tmpfile}"
62 62
63 mv "${tmpfile}" "${conffile}" 63 mv "${tmpfile}" "${conffile}"
64} 64}
65 65

Legend:
Removed from v.1317  
changed lines
  Added in v.1318

  ViewVC Help
Powered by ViewVC 1.1.20