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

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

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

Revision 1301 Revision 1302
86# Start pump on an interface by calling pumpcd $iface $options 86# Start pump on an interface by calling pumpcd $iface $options
87# 87#
88# Returns 0 (true) when a dhcp address is obtained, otherwise 88# Returns 0 (true) when a dhcp address is obtained, otherwise
89# the return value from pump 89# the return value from pump
90pump_start() { 90pump_start() {
91 local iface="$1" opts d ifvar=$( bash_variable "$1" ) 91 local iface="$1" opts d ifvar=$( bash_variable "$1" ) search
92 92
93 interface_exists "${iface}" true || return 1 93 interface_exists "${iface}" true || return 1
94 94
95 eval opts=\" \$\{pump_${ifvar}\} \" 95 eval opts=\" \$\{pump_${ifvar}\} \"
96 96
98 eval d=\" \$\{dhcp_${ifvar}\} \" 98 eval d=\" \$\{dhcp_${ifvar}\} \"
99 [[ ${d} == " " ]] && d=" ${dhcp} " 99 [[ ${d} == " " ]] && d=" ${dhcp} "
100 [[ ${d} == *" nodns "* ]] && opts="${opts} --no-dns" 100 [[ ${d} == *" nodns "* ]] && opts="${opts} --no-dns"
101 [[ ${d} == *" nogateway "* ]] && opts="${opts} --no-gateway" 101 [[ ${d} == *" nogateway "* ]] && opts="${opts} --no-gateway"
102 [[ ${d} == *" nontp "* ]] && opts="${opts} --no-ntp" 102 [[ ${d} == *" nontp "* ]] && opts="${opts} --no-ntp"
103
104 eval search=\"\$\{dns_search_path_${ifvar}\}\"
105 [[ -n ${search} ]] && opts="${opts} --search-path='"${search}"'"
103 106
104 # Add our route metric 107 # Add our route metric
105 eval metric=\"\$\{metric_${ifvar}\}\" 108 eval metric=\"\$\{metric_${ifvar}\}\"
106 [[ -n ${metric} ]] && opts="${opts} --route-metric ${metric}" 109 [[ -n ${metric} ]] && opts="${opts} --route-metric ${metric}"
107 110
117 if [[ ${background} == "yes" ]]; then 120 if [[ ${background} == "yes" ]]; then
118 eval pump ${opts} & 121 eval pump ${opts} &
119 eend 0 122 eend 0
120 go_background 123 go_background
121 fi 124 fi
122 125
123 eval pump ${opts} 126 eval pump ${opts}
124 eend $? || return $? 127 eend $? || return $?
125 128
126 # pump succeeded, show address retrieved 129 # pump succeeded, show address retrieved
127 local addr=$( interface_get_address "${iface}" ) 130 local addr=$( interface_get_address "${iface}" )

Legend:
Removed from v.1301  
changed lines
  Added in v.1302

  ViewVC Help
Powered by ViewVC 1.1.20