/[baselayout]/branches/baselayout-1_12/net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper
Gentoo

Diff of /branches/baselayout-1_12/net-scripts/net.modules.d/helpers.d/dhcpcd-wrapper

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

Revision 1301 Revision 1302
5# Contributed by Roy Marples (uberlord@gentoo.org) 5# Contributed by Roy Marples (uberlord@gentoo.org)
6 6
7interface="${1##*/dhcpcd-}" 7interface="${1##*/dhcpcd-}"
8interface="${interface%%.info}" 8interface="${interface%%.info}"
9 9
10service="net.${interface}"
11
12if [[ $2 != "up" && $2 != "new" ]]; then 10if [[ $2 != "up" && $2 != "new" ]]; then
13 action="down" 11 action="down"
14else 12else
15 action="up" 13 action="up"
16fi 14fi
17 15
16. /lib/rcscripts/net.modules.d/helpers.d/module-loader
17
18if [[ ${action} == "up" ]]; then
19 # Map MAC address variables to interface variables
20 macnet_pre_start "${interface}" 1>/dev/null
21
22 # Map wireless ESSID variables to interface variables
23 if [[ -n ${wireless_module} ]]; then
24 if wireless_check_extensions "${interface}" ; then
25 essidnet_pre_start "${interface}" 1>/dev/null
26 fi
27 fi
28
29 # Add any search paths if we have any defined
30 ifvar=$( bash_variable "${interface}" )
31 eval d=\" \$\{dhcp_${ifvar}\} \"
32 [[ ${d} == " " ]] && d=" ${dhcp} "
33
34 if [[ ${d} != *" nodns "* ]]; then
35 eval search=\"\$\{dns_search_path_${ifvar}\}\"
36 if [[ -n ${search} ]]; then
37 resolv="${statedir}/${interface}/resolv.conf"
38 tmp="${revolv}.$$"
39 egrep -v "^[ \t]*(search|domain)[ \t]*" "${resolv}" > "${tmp}"
40 echo "search ${search}" >> "${tmp}"
41 mv "${tmp}" "${resolv}"
42 fi
43 fi
44fi
45
18. /lib/rcscripts/net.modules.d/helpers.d/dhcp-state 46. /lib/rcscripts/net.modules.d/helpers.d/dhcp-state

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

  ViewVC Help
Powered by ViewVC 1.1.20