/[baselayout]/trunk/sh/net.sh
Gentoo

Contents of /trunk/sh/net.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2880 - (hide annotations) (download) (as text)
Mon Sep 17 21:38:58 2007 UTC (10 years, 1 month ago) by uberlord
File MIME type: text/x-sh
File size: 13129 byte(s)
Fix fallback configurations
1 uberlord 2547 #!/sbin/runscript
2     # Copyright 1999-2007 Gentoo Foundation
3     # Distributed under the terms of the GNU General Public License v2
4    
5     MODULESDIR="${RC_LIBDIR}/net"
6     MODULESLIST="${RC_SVCDIR}/nettree"
7 uberlord 2565 _config_vars="config routes"
8 uberlord 2547
9     [ -z "${IN_BACKGROUND}" ] && IN_BACKGROUND=false
10    
11 uberlord 2763 description="Configures network interfaces."
12    
13 uberlord 2547 depend() {
14 uberlord 2675 local IFACE=${SVCNAME#*.}
15     local IFVAR=$(echo -n "${IFACE}" | sed -e 's/[^[:alnum:]]/_/g')
16 uberlord 2547
17 uberlord 2675 need localmount
18 uberlord 2547 after bootmisc
19 uberlord 2675 provide net
20     case "${IFACE}" in
21 uberlord 2547 lo|lo0) ;;
22     *)
23     after net.lo net.lo0
24     local prov=
25     eval prov=\$RC_NEED_${IFVAR}
26     [ -n "${prov}" ] && need ${prov}
27     eval prov=\$RC_USE_${IFVAR}
28     [ -n "${prov}" ] && use ${prov}
29     eval prov=\$RC_BEFORE_${IFVAR}
30     [ -n "${prov}" ] && before ${prov}
31     eval prov=\$RC_AFTER_${IFVAR}
32     [ -n "${prov}" ] && after ${prov}
33     eval prov=\$RC_PROVIDE_${IFVAR}
34     [ -n "${prov}" ] && provide ${prov}
35     ;;
36 uberlord 2675 esac
37 uberlord 2547 }
38    
39     _shell_var() {
40 uberlord 2675 echo -n "$1" | sed -e 's/[^[:alnum:]]/_/g'
41 uberlord 2547 }
42    
43     # Credit to David Leverton for this function which handily maps a bash array
44     # structure to positional parameters so existing configs work :)
45     # We'll deprecate arrays at some point though.
46     _get_array() {
47 uberlord 2675 if [ -n "${BASH}" ] ; then
48 uberlord 2547 case "$(declare -p "$1" 2>/dev/null)" in
49 uberlord 2675 "declare -a "*)
50     echo "set -- \"\${$1[@]}\""
51     return
52     ;;
53 uberlord 2547 esac
54 uberlord 2675 fi
55 uberlord 2547
56 uberlord 2675 echo "eval set -- \"\$$1\""
57 uberlord 2547 }
58    
59     _wait_for_carrier() {
60 uberlord 2675 local timeout= efunc=einfon
61 uberlord 2547
62 uberlord 2675 _has_carrier && return 0
63 uberlord 2547
64 uberlord 2675 eval timeout=\$carrier_timeout_${IFVAR}
65     timeout=${timeout:-${carrier_timeout:-5}}
66 uberlord 2547
67 uberlord 2668 # Incase users don't want this nice feature ...
68     [ ${timeout} -le 0 ] && return 0
69    
70 uberlord 2768 [ "${RC_PARALLEL}" = "yes" ] && efunc=einfo
71 uberlord 2675 ${efunc} "Waiting for carrier (${timeout} seconds) "
72     while [ ${timeout} -gt 0 ] ; do
73 uberlord 2547 sleep 1
74     if _has_carrier ; then
75 uberlord 2768 [ "${efunc}" = "einfon" ] && echo
76 uberlord 2574 eend 0
77 uberlord 2675 return 0
78 uberlord 2547 fi
79     timeout=$((${timeout} - 1))
80 uberlord 2768 [ "${efunc}" = "einfon" ] && printf "."
81 uberlord 2675 done
82 uberlord 2547
83 uberlord 2768 [ "${efunc}" = "einfon" ] && echo
84 uberlord 2574 eend 1
85 uberlord 2675 return 1
86 uberlord 2547 }
87    
88     _netmask2cidr() {
89 uberlord 2675 local i= len=0
90 uberlord 2547
91 uberlord 2675 local IFS=.
92     for i in $1; do
93 uberlord 2547 while [ ${i} != "0" ] ; do
94 uberlord 2675 len=$((${len} + ${i} % 2))
95     i=$((${i} >> 1))
96 uberlord 2547 done
97 uberlord 2675 done
98 uberlord 2547
99 uberlord 2675 echo "${len}"
100 uberlord 2547 }
101    
102     _configure_variables() {
103 uberlord 2675 local var= v= t=
104 uberlord 2547
105 uberlord 2675 for var in ${_config_vars} ; do
106 uberlord 2547 local v=
107     for t in "$@" ; do
108 uberlord 2675 eval v=\$${var}_${t}
109     if [ -n "${v}" ] ; then
110 uberlord 2547 eval ${var}_${IFVAR}=\$${var}_${t}
111     continue 2
112     fi
113     done
114 uberlord 2675 done
115 uberlord 2547 }
116    
117     _show_address() {
118 uberlord 2675 einfo "received address $(_get_inet_address "${IFACE}")"
119 uberlord 2547 }
120    
121     # Basically sorts our modules into order and saves the list
122     _gen_module_list() {
123 uberlord 2712 local x= f= force=$1
124     if ! ${force} && [ -s "${MODULESLIST}" -a "${MODULESLIST}" -nt "${MODULESDIR}" ] ; then
125 uberlord 2547 local update=false
126     for x in "${MODULESDIR}"/* ; do
127 uberlord 2675 [ -e "${x}" ] || continue
128     if [ "${x}" -nt "${MODULESLIST}" ] ; then
129 uberlord 2547 update=true
130     break
131 uberlord 2675 fi
132 uberlord 2547 done
133     ${update} || return 0
134 uberlord 2675 fi
135 uberlord 2547
136 uberlord 2675 einfo "Caching network module dependencies"
137     # Run in a subshell to protect the main script
138     (
139     after() {
140 uberlord 2547 eval ${MODULE}_after="\"\${${MODULE}_after}\${${MODULE}_after:+ }$*\""
141 uberlord 2675 }
142 uberlord 2547
143 uberlord 2675 before() {
144 uberlord 2547 local mod=${MODULE}
145     local MODULE=
146     for MODULE in "$@" ; do
147 uberlord 2675 after "${mod}"
148 uberlord 2547 done
149 uberlord 2675 }
150 uberlord 2547
151 uberlord 2675 program() {
152 uberlord 2547 if [ "$1" = "start" -o "$1" = "stop" ] ; then
153 uberlord 2675 local s="$1"
154     shift
155     eval ${MODULE}_program_${s}="\"\${${MODULE}_program_${s}}\${${MODULE}_program_${s}:+ }$*\""
156 uberlord 2547 else
157 uberlord 2675 eval ${MODULE}_program="\"\${${MODULE}_program}\${${MODULE}_program:+ }$*\""
158 uberlord 2547 fi
159 uberlord 2675 }
160 uberlord 2547
161 uberlord 2675 provide() {
162 uberlord 2547 eval ${MODULE}_provide="\"\${${MODULE}_provide}\${${MODULE}_provide:+ }$*\""
163     local x
164     for x in $* ; do
165 uberlord 2675 eval ${x}_providedby="\"\${${MODULE}_providedby}\${${MODULE}_providedby:+ }${MODULE}\""
166 uberlord 2547 done
167 uberlord 2675 }
168 uberlord 2547
169 uberlord 2675 for MODULE in "${MODULESDIR}"/* ; do
170 uberlord 2547 sh -n "${MODULE}" || continue
171     . "${MODULE}" || continue
172     MODULE=${MODULE#${MODULESDIR}/}
173     MODULE=${MODULE%.sh}
174     eval ${MODULE}_depend
175     MODULES="${MODULES} ${MODULE}"
176 uberlord 2675 done
177 uberlord 2547
178 uberlord 2675 VISITED=
179     SORTED=
180     visit() {
181 uberlord 2547 case " ${VISITED} " in
182 uberlord 2675 *" $1 "*) return ;;
183 uberlord 2547 esac
184     VISITED="${VISITED} $1"
185    
186     eval AFTER=\$${1}_after
187     for MODULE in ${AFTER} ; do
188 uberlord 2675 eval PROVIDEDBY=\$${MODULE}_providedby
189     if [ -n "${PROVIDEDBY}" ] ; then
190 uberlord 2547 for MODULE in ${PROVIDEDBY} ; do
191 uberlord 2675 visit "${MODULE}"
192 uberlord 2547 done
193 uberlord 2675 else
194 uberlord 2547 visit "${MODULE}"
195 uberlord 2675 fi
196 uberlord 2547 done
197    
198     eval PROVIDE=\$${1}_provide
199     for MODULE in ${PROVIDE} ; do
200 uberlord 2675 visit "${MODULE}"
201 uberlord 2547 done
202    
203     eval PROVIDEDBY=\$${1}_providedby
204     [ -z "${PROVIDEDBY}" ] && SORTED="${SORTED} $1"
205 uberlord 2675 }
206 uberlord 2547
207 uberlord 2675 for MODULE in ${MODULES} ; do
208 uberlord 2547 visit "${MODULE}"
209 uberlord 2675 done
210 uberlord 2547
211 uberlord 2879 printf "" > "${MODULESLIST}"
212 uberlord 2675 i=0
213     for MODULE in ${SORTED} ; do
214 uberlord 2547 eval PROGRAM=\$${MODULE}_program
215     eval PROGRAM_START=\$${MODULE}_program_start
216     eval PROGRAM_STOP=\$${MODULE}_program_stop
217     #for x in ${PROGRAM} ; do
218 uberlord 2675 # [ -x "${x}" ] || continue 2
219 uberlord 2547 #done
220     eval PROVIDE=\$${MODULE}_provide
221     echo "module_${i}='${MODULE}'" >> "${MODULESLIST}"
222     echo "module_${i}_program='${PROGRAM}'" >> "${MODULESLIST}"
223     echo "module_${i}_program_start='${PROGRAM_START}'" >> "${MODULESLIST}"
224     echo "module_${i}_program_stop='${PROGRAM_STOP}'" >> "${MODULESLIST}"
225     echo "module_${i}_provide='${PROVIDE}'" >> "${MODULESLIST}"
226     i=$((${i} + 1))
227 uberlord 2675 done
228     echo "module_${i}=" >> "${MODULESLIST}"
229     )
230 uberlord 2547
231 uberlord 2675 return 0
232 uberlord 2547 }
233    
234     _load_modules() {
235 uberlord 2712 local starting=$1 mymods=
236    
237 uberlord 2675 # Ensure our list is up to date
238 uberlord 2712 _gen_module_list false
239     if ! . "${MODULESLIST}" ; then
240     _gen_module_list true
241     . "${MODULESLIST}"
242     fi
243 uberlord 2547
244 uberlord 2675 MODULES=
245     if [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ] ; then
246 uberlord 2547 eval mymods=\$modules_${IFVAR}
247     [ -z "${mymods}" ] && mymods=${modules}
248 uberlord 2675 fi
249 uberlord 2547
250 uberlord 2675 local i=-1 x= mod= f= provides=
251     while true ; do
252 uberlord 2547 i=$((${i} + 1))
253     eval mod=\$module_${i}
254     [ -z "${mod}" ] && break
255     [ -e "${MODULESDIR}/${mod}.sh" ] || continue
256    
257 uberlord 2675 eval set -- \$module_${i}_program
258 uberlord 2547 if [ -n "$1" ] ; then
259     x=
260     for x in "$@" ; do
261     [ -x "${x}" ] && break
262     done
263     [ -x "${x}" ] || continue
264 uberlord 2675 fi
265 uberlord 2547 if ${starting} ; then
266     eval set -- \$module_${i}_program_start
267     else
268     eval set -- \$module_${i}_program_stop
269     fi
270     if [ -n "$1" ] ; then
271     x=
272     for x in "$@" ; do
273     [ -x "${x}" ] && break
274     done
275     [ -x "${x}" ] || continue
276 uberlord 2675 fi
277 uberlord 2547
278     eval provides=\$module_${i}_provide
279     if ${starting} ; then
280 uberlord 2675 case " ${mymods} " in
281 uberlord 2547 *" !${mod} "*) continue ;;
282     *" !${provides} "*) [ -n "${provides}" ] && continue ;;
283 uberlord 2675 esac
284 uberlord 2547 fi
285     MODULES="${MODULES}${MODULES:+ }${mod}"
286    
287     # Now load and wrap our functions
288     if ! . "${MODULESDIR}/${mod}.sh" ; then
289 uberlord 2675 eend 1 "${SVCNAME}: error loading module \`${mod}'"
290     exit 1
291 uberlord 2547 fi
292    
293     [ -z "${provides}" ] && continue
294    
295     # Wrap our provides
296     local f=
297     for f in pre_start start post_start ; do
298 uberlord 2675 eval "${provides}_${f}() { type ${mod}_${f} >/dev/null 2>/dev/null || return 0; ${mod}_${f} \"\$@\"; }"
299 uberlord 2547 done
300    
301     eval module_${mod}_provides="${provides}"
302     eval module_${provides}_providedby="${mod}"
303 uberlord 2675 done
304 uberlord 2547
305 uberlord 2675 # Wrap our preferred modules
306     for mod in ${mymods} ; do
307 uberlord 2547 case " ${MODULES} " in
308 uberlord 2675 *" ${mod} "*)
309     eval x=\$module_${mod}_provides
310     [ -z "${x}" ] && continue
311     for f in pre_start start post_start ; do
312     eval "${x}_${f}() { type ${mod}_${f} >/dev/null 2>/dev/null || return 0; ${mod}_${f} \"\$@\"; }"
313     done
314     eval module_${x}_providedby="${mod}"
315     ;;
316 uberlord 2547 esac
317 uberlord 2675 done
318 uberlord 2547
319 uberlord 2675 # Finally remove any duplicated provides from our list if we're starting
320     # Otherwise reverse the list
321     local LIST="${MODULES}" p=
322     MODULES=
323     if ${starting} ; then
324 uberlord 2547 for mod in ${LIST} ; do
325 uberlord 2675 eval x=\$module_${mod}_provides
326     if [ -n "${x}" ] ; then
327 uberlord 2547 eval p=\$module_${x}_providedby
328     [ "${mod}" != "${p}" ] && continue
329 uberlord 2675 fi
330     MODULES="${MODULES}${MODULES:+ }${mod}"
331 uberlord 2547 done
332 uberlord 2675 else
333 uberlord 2547 for mod in ${LIST} ; do
334 uberlord 2675 MODULES="${mod}${MODULES:+ }${MODULES}"
335 uberlord 2547 done
336 uberlord 2675 fi
337 uberlord 2547
338 uberlord 2675 veinfo "Loaded modules: ${MODULES}"
339 uberlord 2547 }
340    
341     _load_config() {
342 uberlord 2675 eval "$(_get_array "config_${IFVAR}")"
343     if [ "${IFACE}" = "lo" -o "${IFACE}" = "lo0" ] ; then
344 uberlord 2547 set -- "127.0.0.1/8" "$@"
345 uberlord 2675 else
346 uberlord 2547 if [ $# -eq 0 ] ; then
347 uberlord 2675 ewarn "No configuration specified; defaulting to DHCP"
348     set -- "dhcp"
349 uberlord 2547 fi
350 uberlord 2675 fi
351 uberlord 2547
352 uberlord 2675 # We store our config in an array like vars
353     # so modules can influence it
354     config_index=0
355     for cmd in "$@" ; do
356 uberlord 2547 eval config_${config_index}="'${cmd}'"
357     config_index=$((${config_index} + 1))
358 uberlord 2675 done
359     # Terminate the list
360     eval config_${config_index}=
361 uberlord 2547
362 uberlord 2675 config_index=0
363 uberlord 2880 eval "$(_get_array fallback_${IFVAR})"
364 uberlord 2675 for cmd in "$@" ; do
365 uberlord 2547 eval fallback_${config_index}="'${cmd}'"
366     config_index=$((${config_index} + 1))
367 uberlord 2675 done
368     # Terminate the list
369     eval fallback_${config_index}=
370 uberlord 2547
371     # Don't set to zero, so any net modules don't have to do anything extra
372 uberlord 2675 config_index=-1
373 uberlord 2547 }
374    
375     start() {
376 uberlord 2675 local IFACE=${SVCNAME#*.} oneworked=false module=
377     local IFVAR=$(_shell_var "${IFACE}") cmd= metric=0 our_metric=$metric
378 uberlord 2547
379 uberlord 2675 einfo "Bringing up interface ${IFACE}"
380     eindent
381 uberlord 2547
382 uberlord 2675 if [ -z "${MODULES}" ] ; then
383 uberlord 2547 local MODULES=
384     _load_modules true
385 uberlord 2675 fi
386 uberlord 2547
387 uberlord 2742 # We up the iface twice if we have a preup to ensure it's up if
388     # available in preup and afterwards incase the user inadvertently
389     # brings it down
390 uberlord 2675 if type preup >/dev/null 2>/dev/null ; then
391 uberlord 2742 _up 2>/dev/null
392 uberlord 2547 ebegin "Running preup"
393     eindent
394     preup || return 1
395     eoutdent
396 uberlord 2675 fi
397 uberlord 2547
398 uberlord 2742 _up 2>/dev/null
399    
400 uberlord 2675 for module in ${MODULES} ; do
401 uberlord 2547 if type "${module}_pre_start" >/dev/null 2>/dev/null ; then
402 uberlord 2675 if ! ${module}_pre_start ; then
403 uberlord 2547 eend 1
404     exit 1
405 uberlord 2675 fi
406 uberlord 2547 fi
407 uberlord 2675 done
408 uberlord 2547
409 uberlord 2624 if ! _exists ; then
410     eerror "ERROR: interface ${IFACE} does not exist"
411     eerror "Ensure that you have loaded the correct kernel module for your hardware"
412     return 1
413     fi
414    
415 uberlord 2574 if ! _wait_for_carrier ; then
416     if service_started devd ; then
417     ewarn "no carrier, but devd will start us when we have one"
418     mark_service_inactive "${SVCNAME}"
419     else
420     eerror "no carrier"
421     fi
422     return 1
423     fi
424    
425 uberlord 2675 local config= config_index=
426     _load_config
427 uberlord 2547 config_index=0
428    
429 uberlord 2675 if [ -n "${our_metric}" ] ; then
430 uberlord 2547 metric=${our_metric}
431 uberlord 2675 elif [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ] ; then
432 uberlord 2547 metric=$((${metric} + $(_ifindex)))
433 uberlord 2675 fi
434 uberlord 2547
435 uberlord 2675 while true ; do
436 uberlord 2547 eval config=\$config_${config_index}
437     [ -z "${config}" ] && break
438    
439     set -- "${config}"
440     ebegin "$1"
441     eindent
442     case "$1" in
443 uberlord 2675 noop)
444     if [ -n "$(_get_inet_address)" ] ; then
445 uberlord 2547 oneworked=true
446     break
447 uberlord 2675 fi
448     ;;
449     null) : ;;
450     [0-9]*|*:*) _add_address ${config} ;;
451     *)
452     if type "${config}_start" >/dev/null 2>/dev/null ; then
453 uberlord 2547 "${config}"_start
454 uberlord 2675 else
455 uberlord 2547 eerror "nothing provides \`${config}'"
456 uberlord 2675 fi
457     ;;
458 uberlord 2547 esac
459     if eend $? ; then
460 uberlord 2675 oneworked=true
461 uberlord 2547 else
462 uberlord 2880 eval config=\$fallback_${config_index}
463 uberlord 2675 if [ -n "${config}" ] ; then
464 uberlord 2880 eoutdent
465     ewarn "Trying fallback configuration ${config}"
466     eindent
467     eval config_${config_index}=\$config
468     unset fallback_${config_index}
469 uberlord 2547 config_index=$((${config_index} - 1))
470 uberlord 2675 fi
471 uberlord 2547 fi
472     eoutdent
473     config_index=$((${config_index} + 1))
474 uberlord 2675 done
475 uberlord 2547
476     if ! ${oneworked} ; then
477 uberlord 2675 if type failup >/dev/null 2>/dev/null ; then
478 uberlord 2547 ebegin "Running failup"
479     eindent
480     failup
481     eoutdent
482 uberlord 2675 fi
483 uberlord 2547 return 1
484     fi
485    
486 uberlord 2675 local hidefirstroute=false first=true routes=
487     eval "$(_get_array "routes_${IFVAR}")"
488     if [ "${IFACE}" = "lo" -o "${IFACE}" = "lo0" ] ; then
489 uberlord 2547 set -- "127.0.0.0/8 via 127.0.0.1" "$@"
490     hidefirstroute=true
491 uberlord 2675 fi
492     for cmd in "$@" ; do
493 uberlord 2547 if ${first} ; then
494 uberlord 2675 first=false
495     einfo "Adding routes"
496 uberlord 2547 fi
497     eindent
498     ebegin "${cmd}"
499     # Work out if we're a host or a net if not told
500     case "${cmd}" in
501 uberlord 2675 *" -net "*|*" -host "*) ;;
502     *" netmask "*) cmd="-net ${cmd}" ;;
503     *)
504     case "${cmd%% *}" in
505 uberlord 2547 *.*.*.*/32) cmd="-host ${cmd}" ;;
506     *.*.*.*/*|0.0.0.0|default) cmd="-net ${cmd}" ;;
507     *) cmd="-host ${cmd}" ;;
508 uberlord 2675 esac
509     ;;
510 uberlord 2547 esac
511     if ${hidefirstroute} ; then
512 uberlord 2675 _add_route ${cmd} >/dev/null 2>/dev/null
513     hidefirstroute=false
514 uberlord 2547 else
515 uberlord 2675 _add_route ${cmd} >/dev/null
516 uberlord 2547 fi
517     eend $?
518     eoutdent
519 uberlord 2675 done
520 uberlord 2547
521 uberlord 2675 for module in ${MODULES} ; do
522 uberlord 2547 if type "${module}_post_start" >/dev/null 2>/dev/null ; then
523 uberlord 2675 if ! ${module}_post_start ; then
524     eend 1
525     exit 1
526     fi
527 uberlord 2547 fi
528 uberlord 2675 done
529 uberlord 2547
530 uberlord 2675 if type postup >/dev/null 2>/dev/null ; then
531 uberlord 2547 ebegin "Running postup"
532     eindent
533     postup
534     eoutdent
535 uberlord 2675 fi
536 uberlord 2547
537 uberlord 2675 return 0
538 uberlord 2547 }
539    
540     stop() {
541 uberlord 2675 local IFACE=${SVCNAME#*.} module=
542     local IFVAR=$(_shell_var "${IFACE}") opts=
543 uberlord 2547
544 uberlord 2675 einfo "Bringing down interface ${IFACE}"
545     eindent
546 uberlord 2547
547 uberlord 2675 if [ -z "${MODULES}" ] ; then
548 uberlord 2547 local MODULES=
549     _load_modules false
550 uberlord 2675 fi
551 uberlord 2547
552 uberlord 2675 if type predown >/dev/null 2>/dev/null ; then
553 uberlord 2547 ebegin "Running predown"
554     eindent
555     predown || return 1
556     eoutdent
557 uberlord 2675 fi
558 uberlord 2547
559 uberlord 2675 for module in ${MODULES} ; do
560 uberlord 2547 if type "${module}_pre_stop" >/dev/null 2>/dev/null ; then
561 uberlord 2675 if ! ${module}_pre_stop ; then
562     eend 1
563     exit 1
564     fi
565     fi
566     done
567 uberlord 2547
568 uberlord 2675 for module in ${MODULES} ; do
569 uberlord 2547 if type "${module}_stop" >/dev/null 2>/dev/null ; then
570 uberlord 2675 ${module}_stop
571 uberlord 2547 fi
572 uberlord 2675 done
573 uberlord 2547
574 uberlord 2674 # Only delete addresses for non PPP interfaces
575     if ! type is_ppp >/dev/null 2>/dev/null || ! is_ppp ; then
576     _delete_addresses "${IFACE}"
577     fi
578 uberlord 2547
579 uberlord 2675 for module in ${MODULES} ; do
580 uberlord 2547 if type "${module}_post_stop" >/dev/null 2>/dev/null ; then
581 uberlord 2675 ${module}_post_stop
582 uberlord 2547 fi
583 uberlord 2675 done
584 uberlord 2547
585 uberlord 2675 [ "${IN_BACKGROUND}" != "true" ] && \
586     [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ] && \
587     _down 2>/dev/null
588 uberlord 2547
589 uberlord 2675 [ -x /sbin/resolvconf ] && resolvconf -d "${IFACE}"
590 uberlord 2547
591 uberlord 2675 if type postdown >/dev/null 2>/dev/null ; then
592 uberlord 2547 ebegin "Running postdown"
593     eindent
594     postdown
595     eoutdent
596 uberlord 2675 fi
597 uberlord 2547
598 uberlord 2675 return 0
599 uberlord 2547 }
600    
601 uberlord 2675 # vim: set ts=4 sw=4 :

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20