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

Diff of /trunk/sh/net.sh

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

Revision 2711 Revision 2712
116 einfo "received address $(_get_inet_address "${IFACE}")" 116 einfo "received address $(_get_inet_address "${IFACE}")"
117} 117}
118 118
119# Basically sorts our modules into order and saves the list 119# Basically sorts our modules into order and saves the list
120_gen_module_list() { 120_gen_module_list() {
121 local x= f= 121 local x= f= force=$1
122 if [ -s "${MODULESLIST}" -a "${MODULESLIST}" -nt "${MODULESDIR}" ] ; then 122 if ! ${force} && [ -s "${MODULESLIST}" -a "${MODULESLIST}" -nt "${MODULESDIR}" ] ; then
123 local update=false 123 local update=false
124 for x in "${MODULESDIR}"/* ; do 124 for x in "${MODULESDIR}"/* ; do
125 [ -e "${x}" ] || continue 125 [ -e "${x}" ] || continue
126 if [ "${x}" -nt "${MODULESLIST}" ] ; then 126 if [ "${x}" -nt "${MODULESLIST}" ] ; then
127 update=true 127 update=true
228 228
229 return 0 229 return 0
230} 230}
231 231
232_load_modules() { 232_load_modules() {
233 local starting=$1 mymods=
234
233 # Ensure our list is up to date 235 # Ensure our list is up to date
234 _gen_module_list 236 _gen_module_list false
235 237 if ! . "${MODULESLIST}" ; then
236 local starting=$1 mymods= 238 _gen_module_list true
239 . "${MODULESLIST}"
240 fi
237 241
238 MODULES= 242 MODULES=
239 if [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ] ; then 243 if [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ] ; then
240 eval mymods=\$modules_${IFVAR} 244 eval mymods=\$modules_${IFVAR}
241 [ -z "${mymods}" ] && mymods=${modules} 245 [ -z "${mymods}" ] && mymods=${modules}
242 fi 246 fi
243 247
244 . "${MODULESLIST}"
245 local i=-1 x= mod= f= provides= 248 local i=-1 x= mod= f= provides=
246 while true ; do 249 while true ; do
247 i=$((${i} + 1)) 250 i=$((${i} + 1))
248 eval mod=\$module_${i} 251 eval mod=\$module_${i}
249 [ -z "${mod}" ] && break 252 [ -z "${mod}" ] && break

Legend:
Removed from v.2711  
changed lines
  Added in v.2712

  ViewVC Help
Powered by ViewVC 1.1.20