Magellan Linux

Diff of /trunk/initscripts/busybox/rc/network

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

revision 1193 by niro, Thu Jan 27 20:41:29 2011 UTC revision 1237 by niro, Thu Mar 10 20:25:17 2011 UTC
# Line 114  checkconfig() Line 114  checkconfig()
114   rc_echo "using default programm /sbin/udhcpc"   rc_echo "using default programm /sbin/udhcpc"
115   DHCP_PROG="/sbin/udhcpc"   DHCP_PROG="/sbin/udhcpc"
116   fi   fi
117   [[ -z ${DHCP_START} ]] && DHCP_START="-T 10"   [[ -z ${DHCP_START} ]] && DHCP_START="-T10"
118   [[ -z ${DHCP_STOP} ]] && DHCP_STOP="-k"   [[ -z ${DHCP_STOP} ]] && DHCP_STOP=""
119   ;;   ;;
120    
121   esac   esac
# Line 131  onboot_interface_list() Line 131  onboot_interface_list()
131   # get list of all devices   # get list of all devices
132   for file in $@   for file in $@
133   do   do
134     iface="$(basename ${file} | sed s/net.//)"
135    
136     # exclude backup files and exclude net.routes and net.sample too
137     case "${iface}" in
138     *~) continue ;;
139     routes) continue ;;
140     sample) continue ;;
141     esac
142    
143   if [[ $(read_value ONBOOT ${file}) = yes ]]   if [[ $(read_value ONBOOT ${file}) = yes ]]
144   then   then
145   iface="$(basename ${file} | sed s/net.//)"   devices="${devices} ${iface}"
  # exclude backup files and exclude net.routes too  
  case "${iface}" in  
  *~) ;;  
  */net.routes) ;;  
  *) devices="${devices} $(basename ${file} | sed s/net.//)" ;;  
  esac  
146   fi   fi
147   done   done
148    
# Line 405  config_routes() Line 408  config_routes()
408    
409   # only add and del are allowed   # only add and del are allowed
410   case ${method} in   case ${method} in
411   add) message="Adding route ${COLBLUE}${route}${COLDEFAULT} ..." ;;   add) message="Adding" ;;
412   del) message="Removing route ${COLBLUE}${route}${COLDEFAULT} ..." ;;   del) message="Removing" ;;
413   *)   *)
414   rc_echo "config_routes: unsupported \$method '${method}'."   rc_echo "config_routes: unsupported \$method '${method}'."
415   exit 1   exit 1
# Line 422  config_routes() Line 425  config_routes()
425   case "${route}" in   case "${route}" in
426   \#*|"") continue ;;   \#*|"") continue ;;
427   esac   esac
428   rc_print "${message}"   rc_print "${message} route ${COLBLUE}${route}${COLDEFAULT} ..."
429   route "${method}" "${route}"   # do not esacpe ${route} or it breaks!
430     route "${method}" ${route}
431   evaluate_retval   evaluate_retval
432   done   done
433   fi   fi
# Line 588  networking_stop() Line 592  networking_stop()
592   ${CURS_UP}   ${CURS_UP}
593   ${SET_WWCOL}   ${SET_WWCOL}
594   rc_echo "[$(basename ${DHCP_PROG})]"   rc_echo "[$(basename ${DHCP_PROG})]"
595   ${DHCP_PROG} ${DHCP_STOP} "${iface}"   if [[ -z ${DHCP_STOP} ]]
596   evaluate_retval   then
597     killproc ${DHCP_PROG}
598     evaluate_retval
599     else
600     ${DHCP_PROG} ${DHCP_STOP} "${iface}"
601     evaluate_retval
602     fi
603   fi   fi
604    
605   # shutdown wpa_supplicant daemon   # shutdown wpa_supplicant daemon

Legend:
Removed from v.1193  
changed lines
  Added in v.1237