/[baselayout]/trunk/net-scripts/init.d/net.lo
Gentoo

Diff of /trunk/net-scripts/init.d/net.lo

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

Revision 871 Revision 872
85go_background() { 85go_background() {
86 einfo "Backgrounding ..." 86 einfo "Backgrounding ..."
87 mark_service_started net.${iface} 87 mark_service_started net.${iface}
88 mark_service_inactive net.${iface} 88 mark_service_inactive net.${iface}
89 exit 0 89 exit 0
90}
91
92# void module_class_wrap(char *module, char *provides)
93# Setup class wrappers: interface_up -> iproute2_up, for example
94module_class_wrap() {
95 local module=$1 provides=$2 x
96
97 # Don't wrap functions if another module already has
98 [[ $( type -t ${provides}_provides ) == function ]] && return
99
100 for x in $( typeset -f | grep -o ^${module}_'[^ ]*' ); do
101 eval "${provides}${x#${module}}() { ${x} \"\$@\"; }"
102 done
103} 90}
104 91
105# bool module_load_minimum(char *module) 92# bool module_load_minimum(char *module)
106# 93#
107# Does the minimum checking on a module - even when forcing 94# Does the minimum checking on a module - even when forcing
212 # Global setting follows interface-specific setting 199 # Global setting follows interface-specific setting
213 umods=( "${umods[@]}" "${modules[@]}" ) 200 umods=( "${umods[@]}" "${modules[@]}" )
214 201
215 # Add our preferred modules 202 # Add our preferred modules
216 npref=3 203 npref=3
217 umods=( "${umods[@]}" "ifconfig" "dhcpcd" "iwconfig" ) 204 umods=( "${umods[@]}" "iproute2" "dhcpcd" "iwconfig" )
218 205
219 # First we strip any modules that conflict from user settings 206 # First we strip any modules that conflict from user settings
220 # So if the user specifies pump then we don't use dhcpcd 207 # So if the user specifies pump then we don't use dhcpcd
221 for (( i=0; i<${#umods[@]}; i++ )); do 208 for (( i=0; i<${#umods[@]}; i++ )); do
222 # Some users will inevitably put "dhcp" in their modules 209 # Some users will inevitably put "dhcp" in their modules
466 fi 453 fi
467 454
468 # Setup class wrappers: interface_up -> iproute2_up, for example 455 # Setup class wrappers: interface_up -> iproute2_up, for example
469 j=${#MODULES[@]} 456 j=${#MODULES[@]}
470 for (( i=0; i<j; i++ )); do 457 for (( i=0; i<j; i++ )); do
471 module_class_wrap ${MODULES[i]} ${PROVIDES[i]} 458 function_wrap ${MODULES[i]} ${PROVIDES[i]}
472 done 459 done
473 460
474 modules_check_installed || return 1 461 modules_check_installed || return 1
475 462
476 [[ ${iface} != "lo" ]] && veinfo "modules: ${MODULES[@]}" 463 [[ ${iface} != "lo" ]] && veinfo "modules: ${MODULES[@]}"

Legend:
Removed from v.871  
changed lines
  Added in v.872

  ViewVC Help
Powered by ViewVC 1.1.20