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

Contents of /trunk/sh/net.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2763 - (hide annotations) (download) (as text)
Tue Jul 10 19:09:41 2007 UTC (10 years, 5 months ago) by uberlord
File MIME type: text/x-sh
File size: 13151 byte(s)
init scripts and their extra options can now have descriptions, #184327.
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 2675 [ -n "${RC_EBUFFER}" -o "${RC_PREFIX}" = "yes" ] && efunc=einfo
71     ${efunc} "Waiting for carrier (${timeout} seconds) "
72     while [ ${timeout} -gt 0 ] ; do
73 uberlord 2547 sleep 1
74     if _has_carrier ; then
75 uberlord 2675 [ -z "${RC_EBUFFER}" ] && echo
76 uberlord 2574 eend 0
77 uberlord 2675 return 0
78 uberlord 2547 fi
79     timeout=$((${timeout} - 1))
80 uberlord 2668 [ -z "${RC_EBUFFER}" -a "${RC_PREFIX}" != "yes" ] && printf "."
81 uberlord 2675 done
82 uberlord 2547
83 uberlord 2675 [ -z "${RC_EBUFFER}" -a "${RC_PREFIX}" != "yes" ] && 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 2675 > "${MODULESLIST}"
212     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     eval $(_get_array fallback_${IFVAR})
364     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 2675 eval config=\$fallback_${IFVAR}
463     if [ -n "${config}" ] ; then
464 uberlord 2547 einfo "Trying fallback configuration"
465     eval config_${config_index}=\$fallback_${IFVAR}
466     eval fallback_${config_index}=
467     config_index=$((${config_index} - 1))
468 uberlord 2675 fi
469 uberlord 2547 fi
470     eoutdent
471     config_index=$((${config_index} + 1))
472 uberlord 2675 done
473 uberlord 2547
474     if ! ${oneworked} ; then
475 uberlord 2675 if type failup >/dev/null 2>/dev/null ; then
476 uberlord 2547 ebegin "Running failup"
477     eindent
478     failup
479     eoutdent
480 uberlord 2675 fi
481 uberlord 2547 return 1
482     fi
483    
484 uberlord 2675 local hidefirstroute=false first=true routes=
485     eval "$(_get_array "routes_${IFVAR}")"
486     if [ "${IFACE}" = "lo" -o "${IFACE}" = "lo0" ] ; then
487 uberlord 2547 set -- "127.0.0.0/8 via 127.0.0.1" "$@"
488     hidefirstroute=true
489 uberlord 2675 fi
490     for cmd in "$@" ; do
491 uberlord 2547 if ${first} ; then
492 uberlord 2675 first=false
493     einfo "Adding routes"
494 uberlord 2547 fi
495     eindent
496     ebegin "${cmd}"
497     # Work out if we're a host or a net if not told
498     case "${cmd}" in
499 uberlord 2675 *" -net "*|*" -host "*) ;;
500     *" netmask "*) cmd="-net ${cmd}" ;;
501     *)
502     case "${cmd%% *}" in
503 uberlord 2547 *.*.*.*/32) cmd="-host ${cmd}" ;;
504     *.*.*.*/*|0.0.0.0|default) cmd="-net ${cmd}" ;;
505     *) cmd="-host ${cmd}" ;;
506 uberlord 2675 esac
507     ;;
508 uberlord 2547 esac
509     if ${hidefirstroute} ; then
510 uberlord 2675 _add_route ${cmd} >/dev/null 2>/dev/null
511     hidefirstroute=false
512 uberlord 2547 else
513 uberlord 2675 _add_route ${cmd} >/dev/null
514 uberlord 2547 fi
515     eend $?
516     eoutdent
517 uberlord 2675 done
518 uberlord 2547
519 uberlord 2675 for module in ${MODULES} ; do
520 uberlord 2547 if type "${module}_post_start" >/dev/null 2>/dev/null ; then
521 uberlord 2675 if ! ${module}_post_start ; then
522     eend 1
523     exit 1
524     fi
525 uberlord 2547 fi
526 uberlord 2675 done
527 uberlord 2547
528 uberlord 2675 if type postup >/dev/null 2>/dev/null ; then
529 uberlord 2547 ebegin "Running postup"
530     eindent
531     postup
532     eoutdent
533 uberlord 2675 fi
534 uberlord 2547
535 uberlord 2675 return 0
536 uberlord 2547 }
537    
538     stop() {
539 uberlord 2675 local IFACE=${SVCNAME#*.} module=
540     local IFVAR=$(_shell_var "${IFACE}") opts=
541 uberlord 2547
542 uberlord 2675 einfo "Bringing down interface ${IFACE}"
543     eindent
544 uberlord 2547
545 uberlord 2675 if [ -z "${MODULES}" ] ; then
546 uberlord 2547 local MODULES=
547     _load_modules false
548 uberlord 2675 fi
549 uberlord 2547
550 uberlord 2675 if type predown >/dev/null 2>/dev/null ; then
551 uberlord 2547 ebegin "Running predown"
552     eindent
553     predown || return 1
554     eoutdent
555 uberlord 2675 fi
556 uberlord 2547
557 uberlord 2675 for module in ${MODULES} ; do
558 uberlord 2547 if type "${module}_pre_stop" >/dev/null 2>/dev/null ; then
559 uberlord 2675 if ! ${module}_pre_stop ; then
560     eend 1
561     exit 1
562     fi
563     fi
564     done
565 uberlord 2547
566 uberlord 2675 for module in ${MODULES} ; do
567 uberlord 2547 if type "${module}_stop" >/dev/null 2>/dev/null ; then
568 uberlord 2675 ${module}_stop
569 uberlord 2547 fi
570 uberlord 2675 done
571 uberlord 2547
572 uberlord 2674 # Only delete addresses for non PPP interfaces
573     if ! type is_ppp >/dev/null 2>/dev/null || ! is_ppp ; then
574     _delete_addresses "${IFACE}"
575     fi
576 uberlord 2547
577 uberlord 2675 for module in ${MODULES} ; do
578 uberlord 2547 if type "${module}_post_stop" >/dev/null 2>/dev/null ; then
579 uberlord 2675 ${module}_post_stop
580 uberlord 2547 fi
581 uberlord 2675 done
582 uberlord 2547
583 uberlord 2675 [ "${IN_BACKGROUND}" != "true" ] && \
584     [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ] && \
585     _down 2>/dev/null
586 uberlord 2547
587 uberlord 2675 [ -x /sbin/resolvconf ] && resolvconf -d "${IFACE}"
588 uberlord 2547
589 uberlord 2675 if type postdown >/dev/null 2>/dev/null ; then
590 uberlord 2547 ebegin "Running postdown"
591     eindent
592     postdown
593     eoutdent
594 uberlord 2675 fi
595 uberlord 2547
596 uberlord 2675 return 0
597 uberlord 2547 }
598    
599 uberlord 2675 # vim: set ts=4 sw=4 :

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20