Magellan Linux

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

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

revision 724 by niro, Mon Jun 2 22:14:35 2008 UTC revision 1227 by niro, Thu Feb 17 22:24:59 2011 UTC
# Line 64  read_value() Line 64  read_value()
64    
65   local BRIDGE_INTERFACES   local BRIDGE_INTERFACES
66   local BRIDGE_STP   local BRIDGE_STP
67     local BRIDGE_AGEING_TIME
68     local BRIDGE_PRIORITY
69     local BRIDGE_FORWARD_DELAY
70     local BRIDGE_HELLO_TIME
71     local BRIDGE_MAX_MESSAGE_AGE
72     local BRIDGE_PATH_COST
73     local BRIDGE_PORT_PRIORITY
74    
75   source ${file}   source ${file}
76   eval value=\$$(echo ${var})   eval value=\$$(echo ${var})
# Line 74  checkconfig() Line 81  checkconfig()
81  {  {
82   if [[ -z ${NETWORKING} ]]   if [[ -z ${NETWORKING} ]]
83   then   then
84   echo "NETWORKING missing in net.${interface}, aborted"   rc_echo "NETWORKING missing in net.${iface}, aborted"
85   exit 1   exit 1
86   fi   fi
87    
# Line 82  checkconfig() Line 89  checkconfig()
89   static)   static)
90   if [[ -z ${IP} ]]   if [[ -z ${IP} ]]
91   then   then
92   echo "IP missing in net.${interface}, aborted"   rc_echo "IP missing in net.${iface}, aborted"
93   exit 1   exit 1
94   fi   fi
95    
96   if [[ -z ${NETMASK} ]]   if [[ -z ${NETMASK} ]]
97   then   then
98   echo -n "NETMASK missing in net.${interface}, "   rc_echo -n "NETMASK missing in net.${iface}, "
99   echo "using 255.255.255.0"   rc_echo "using 255.255.255.0"
100   NETMASK=255.255.255.0   NETMASK=255.255.255.0
101   fi   fi
102    
103   if [[ -z ${BROADCAST} ]]   if [[ -z ${BROADCAST} ]]
104   then   then
105   echo -n "BROADCAST missing in net.${interface}, "   rc_echo -n "BROADCAST missing in net.${iface}, "
106   echo "using default address"   rc_echo "using default address"
107   fi   fi
108   ;;   ;;
109    
110   dhcp)   dhcp)
111   if [[ -z ${DHCP_PROG} ]]   if [[ -z ${DHCP_PROG} ]]
112   then   then
113   echo "DHCP_PROG missing in net.${interface}, aborted"   rc_echo -n "DHCP_PROG missing in net.${iface},"
114   exit 1   rc_echo "using default programm /sbin/udhcpc"
115   fi   DHCP_PROG="/sbin/udhcpc"
116     fi
117     [[ -z ${DHCP_START} ]] && DHCP_START="-T10"
118     [[ -z ${DHCP_STOP} ]] && DHCP_STOP="-k"
119   ;;   ;;
120    
121   esac   esac
# Line 142  config_wireless_wep() Line 152  config_wireless_wep()
152    
153   if [[ -z ${iface} ]]   if [[ -z ${iface} ]]
154   then   then
155   echo "WEP: no \$iface given. Aborting setup."   rc_echo "WEP: no \$iface given. Aborting setup."
156   return 1   return 1
157   fi   fi
158    
159   ${CURS_UP}   ${CURS_UP}
160   ${SET_WWCOL}   ${SET_WWCOL}
161   echo "[AUTH: WEP]"   rc_echo "[AUTH: WEP]"
162    
163   iwconfig "${iface}" enc on   iwconfig "${iface}" enc on
164   [[ -n ${WIRELESS_KEY_LENGTH} ]] && iwconfig "${iface}" enc "${WIRELESS_KEY_LENGTH}"   [[ -n ${WIRELESS_KEY_LENGTH} ]] && iwconfig "${iface}" enc "${WIRELESS_KEY_LENGTH}"
# Line 162  config_wireless_wpa() Line 172  config_wireless_wpa()
172    
173   if [[ -z ${iface} ]]   if [[ -z ${iface} ]]
174   then   then
175   echo "WPA: no \$iface given. Aborting setup."   rc_echo "WPA: no \$iface given. Aborting setup."
176   return 1   return 1
177   fi   fi
178    
179   if [ ! -x /sbin/wpa_supplicant ]   if [ ! -x /sbin/wpa_supplicant ]
180   then   then
181   echo "WPA: wpa_supplicant not installed. Aborting setup."   rc_echo "WPA: wpa_supplicant not installed. Aborting setup."
182   return 1   return 1
183   fi   fi
184    
185   ${CURS_UP}   ${CURS_UP}
186   ${SET_WWCOL}   ${SET_WWCOL}
187   echo "[AUTH: WPA]"   rc_echo "[AUTH: WPA]"
188    
189   # get default settings   # get default settings
190   [[ -f /etc/conf.d/wpa_supplicant ]] && source /etc/conf.d/wpa_supplicant   [[ -f /etc/conf.d/wpa_supplicant ]] && source /etc/conf.d/wpa_supplicant
# Line 182  config_wireless_wpa() Line 192  config_wireless_wpa()
192   # check the configuration   # check the configuration
193   [[ -z ${WIRELESS_WPA_CONFIG} ]] && WIRELESS_WPA_CONFIG=/etc/wpa_supplicant.auto   [[ -z ${WIRELESS_WPA_CONFIG} ]] && WIRELESS_WPA_CONFIG=/etc/wpa_supplicant.auto
194   [[ -z ${WIRELESS_WPA_SKEL} ]] && WIRELESS_WPA_SKEL=/etc/conf.d/wpa_supplicant.skel   [[ -z ${WIRELESS_WPA_SKEL} ]] && WIRELESS_WPA_SKEL=/etc/conf.d/wpa_supplicant.skel
195   if [[ -z ${WIRELESS_WPA_DRIVER} ]]  
196   then   # use wext as default driver, do not abort here anymore
197   echo "WPA: WIRELESS_WPA_DRIVER given. Aborting setup."   [[ -z ${WIRELESS_WPA_DRIVER} ]] && WIRELESS_WPA_DRIVER=wext
  return 1  
  fi  
198    
199   # write a config with the settings from net.${iface}   # write a config with the settings from net.${iface}
200   # only wpa-psk ! all other needs manual setup   # only wpa-psk ! all other needs manual setup
# Line 195  config_wireless_wpa() Line 203  config_wireless_wpa()
203   # write default cfg from skeleton   # write default cfg from skeleton
204   cat ${WIRELESS_WPA_SKEL} > ${WIRELESS_WPA_CONFIG}   cat ${WIRELESS_WPA_SKEL} > ${WIRELESS_WPA_CONFIG}
205    
206     local wpa_proto
207     case ${WIRELESS_AUTH_MODE} in
208     wpa) wpa_proto="WPA" ;;
209     wpa2) wpa_proto="WPA2" ;;
210     esac
211    
212   # setup the network entry   # setup the network entry
213   sed -i -e "s:@WIRELESS_ESSID@:${WIRELESS_ESSID}:g" \   sed -i -e "s:@WIRELESS_ESSID@:${WIRELESS_ESSID}:g" \
214   -e "s:@WIRELESS_KEY@:${WIRELESS_KEY}:g" \   -e "s:@WIRELESS_KEY@:${WIRELESS_KEY_ASCII}:g" \
215     -e "s:@WIRELESS_AUTH_MODE@:${wpa_proto}:g" \
216   ${WIRELESS_WPA_CONFIG}   ${WIRELESS_WPA_CONFIG}
217   fi   fi
218    
# Line 212  config_wireless_wpa() Line 227  config_wireless_wpa()
227   ${WIRELESS_WPA_OPTS}   ${WIRELESS_WPA_OPTS}
228    
229   # echo wait 5 seconds   # echo wait 5 seconds
230   echo "    Waiting 5 seconds to retrieve authentification reply ... "   rc_echo "    Waiting 5 seconds to retrieve authentification reply ... "
231   sleep 5   sleep 5
232  }  }
233    
# Line 222  setup_wireless_extensions() Line 237  setup_wireless_extensions()
237    
238   if [[ -z ${iface} ]]   if [[ -z ${iface} ]]
239   then   then
240   echo "WIRELESS_EXTENSIONS: no \$iface given. Aborting setup."   rc_echo "WIRELESS_EXTENSIONS: no \$iface given. Aborting setup."
241   return 1   return 1
242   fi   fi
243    
# Line 234  setup_wireless_extensions() Line 249  setup_wireless_extensions()
249   [[ -n ${WIRELESS_NICK} ]] ||   [[ -n ${WIRELESS_NICK} ]] ||
250   [[ -n ${WIRELESS_AUTH_MODE} ]]   [[ -n ${WIRELESS_AUTH_MODE} ]]
251   then   then
252   echo -e ${COLOREDSTAR}"Setting up wlan-ext for ${COLBLUE}${iface}${COLDEFAULT} ... "   rc_print "Setting up wlan-ext for ${COLBLUE}${iface}${COLDEFAULT} ... "
253   fi   fi
254    
255   [[ -n ${WIRELESS_BITRATE} ]] && iwconfig "${iface}" rate "${WIRELESS_BITRATE}"   [[ -n ${WIRELESS_BITRATE} ]] && iwconfig "${iface}" rate "${WIRELESS_BITRATE}"
# Line 245  setup_wireless_extensions() Line 260  setup_wireless_extensions()
260   [[ -n ${WIRELESS_NICK} ]] && iwconfig "${iface}" nick "${WIRELESS_NICK}"   [[ -n ${WIRELESS_NICK} ]] && iwconfig "${iface}" nick "${WIRELESS_NICK}"
261    
262   case "${WIRELESS_AUTH_MODE}" in   case "${WIRELESS_AUTH_MODE}" in
263   wpa) config_wireless_wpa "${iface}" ;;   wpa|wpa2) config_wireless_wpa "${iface}" ;;
264   wep|on) config_wireless_wep "${iface}" ;;   wep|on) config_wireless_wep "${iface}" ;;
265   off) iwconfig "${iface}" enc off ;;   off) iwconfig "${iface}" enc off ;;
266   esac   esac
267  }  }
268    
269    config_bridge_options()
270    {
271     local iface="$1"
272     local i
273     local port
274     local cost
275     local prio
276    
277     # enable spanning-tree protocol
278     case ${BRIDGE_STP} in
279     on|off) brctl stp "${iface}" "${BRIDGE_STP}" ;;
280     *) rc_echo "BRIDGE: unkown value \$BRIDGE_STP='$BRIDGE_STP'."; return 1 ;;
281     esac
282    
283     # configure ageing time
284     if [[ ! -z ${BRIDGE_AGEING_TIME} ]]
285     then
286     brctl setageing "${iface}" "${BRIDGE_AGEING_TIME}"
287     fi
288    
289     # configure bridge priority
290     if [[ ! -z ${BRIDGE_PRIORITY} ]]
291     then
292     brctl setbridgeprio "${iface}" "${BRIDGE_PRIORITY}"
293     fi
294    
295     # configure forward delay
296     if [[ ! -z ${BRIDGE_FORWARD_DELAY} ]]
297     then
298     brctl setfd "${iface}" "${BRIDGE_FORWARD_DELAY}"
299     fi
300    
301     # configure hello time
302     if [[ ! -z ${BRIDGE_HELLO_TIME} ]]
303     then
304     brctl sethello "${iface}" "${BRIDGE_HELLO_TIME}"
305     fi
306    
307     # configure maximal message age
308     if [[ ! -z ${BRIDGE_MAX_MESSAGE_AGE} ]]
309     then
310     brctl setmaxage "${iface}" "${BRIDGE_MAX_MESSAGE_AGE}"
311     fi
312    
313     # configure path cost for every port
314     if [[ ! -z ${BRIDGE_PATH_COST} ]]
315     then
316     for i in ${BRIDGE_PATH_COST}
317     do
318     port="${i%=*}"
319     cost="${i#*=}"
320     [[ ! -z ${port} ]] && brctl pathcost "${iface}" "${port}" "${cost}"
321     done
322     fi
323    
324     # configure port priority for every port
325     if [[ ! -z ${BRIDGE_PORT_PRIORITY} ]]
326     then
327     for i in ${BRIDGE_PORT_PRIORITY}
328     do
329     port="${i%=*}"
330     prio="${i#*=}"
331     [[ ! -z ${port} ]] && brctl setportprio "${iface}" "${port}" "${prio}"
332     done
333     fi
334    }
335    
336  config_bridge_devices()  config_bridge_devices()
337  {  {
338   local iface="$1"   local iface="$1"
# Line 259  config_bridge_devices() Line 341  config_bridge_devices()
341    
342   if [[ -z ${iface} ]]   if [[ -z ${iface} ]]
343   then   then
344   echo "BRIDGE: no \$iface given. Aborting setup."   rc_echo "BRIDGE: no \$iface given. Aborting setup."
345   return 1   return 1
346   fi   fi
347    
348   if [[ -z ${method} ]]   if [[ -z ${method} ]]
349   then   then
350   echo "BRIDGE: no \$method given. Aborting setup."   rc_echo "BRIDGE: no \$method given. Aborting setup."
351   return 1   return 1
352   fi   fi
353    
354   # first check for brctl   # first check for brctl
355   if [[ -z $(which brctl) ]]   if [[ -z $(which brctl) ]]
356   then   then
357   echo "brctl not found! Please install 'net-misc/bridge-utils'."   rc_echo "brctl not found! Please install 'net-misc/bridge-utils'."
358   return 1   return 1
359   fi   fi
360    
361   # check the config   # check the config
362   if [[ -z ${BRIDGE_INTERFACES} ]]   if [[ -z ${BRIDGE_INTERFACES} ]]
363   then   then
364   echo "BRIDGE: no \$BRIDGE_INTERFACES given. Aborting setup."   rc_echo "BRIDGE: no \$BRIDGE_INTERFACES given. Aborting setup."
365   return 1   return 1
366   fi   fi
367    
368   case ${method} in   case ${method} in
369   add)   add)
370   # setup the bridge device   # setup the bridge device
371   brctl addbr ${iface}   brctl addbr "${iface}"
372   for bport in ${BRIDGE_INTERFACES}   for bport in ${BRIDGE_INTERFACES}
373   do   do
374   # enter promiscous mode   # enter promiscous mode
375   ifconfig ${bport} 0.0.0.0 promisc   ifconfig "${bport}" 0.0.0.0 promisc
376   # now setup the bridge   # now setup the bridge
377   brctl addif ${iface} ${bport}   brctl addif "${iface}" "${bport}"
378   done   done
379   # enable spanning-tree protocol   # configure all other options
380   case ${BRIDGE_STP} in   config_bridge_options "${iface}"
  on|off) brctl stp ${iface} ${BRIDGE_STP} ;;  
  *) echo "BRIDGE: unkown value \$BRIDGE_STP='$BRIDGE_STP'."; return 1 ;;  
  esac  
381   ;;   ;;
382    
383   remove)   remove)
384   for bport in ${BRIDGE_INTERFACE}   for bport in ${BRIDGE_INTERFACE}
385   do   do
386   # bring the interface down   # bring the interface down
387   ifconfig ${bport} down   ifconfig "${bport}" down
388   # remove the interface from the bridge   # remove the interface from the bridge
389   brctl delif ${iface} ${bport}   brctl delif "${iface}" "${bport}"
390   done   done
391   # bring the bridge down   # bring the bridge down
392   brctl delbr ${iface}   brctl delbr "${iface}"
393   ;;   ;;
394   esac   esac
395    
# Line 326  config_routes() Line 405  config_routes()
405    
406   # only add and del are allowed   # only add and del are allowed
407   case ${method} in   case ${method} in
408   add) message="Adding route ${COLBLUE}${route}${COLDEFAULT} ..." ;;   add) message="Adding" ;;
409   del) message="Removing route ${COLBLUE}${route}${COLDEFAULT} ..." ;;   del) message="Removing" ;;
410   *)   *)
411   echo "config_routes: unsupported \$method '${method}'."   rc_echo "config_routes: unsupported \$method '${method}'."
412   exit 1   exit 1
413   ;;   ;;
414   esac   esac
# Line 343  config_routes() Line 422  config_routes()
422   case "${route}" in   case "${route}" in
423   \#*|"") continue ;;   \#*|"") continue ;;
424   esac   esac
425   echo -e ${COLOREDSTAR}"${message}"   rc_print "${message} route ${COLBLUE}${route}${COLDEFAULT} ..."
426   route ${method} ${route}   # do not esacpe ${route} or it breaks!
427     route "${method}" ${route}
428   evaluate_retval   evaluate_retval
429   done   done
430   fi   fi
# Line 356  networking_start() Line 436  networking_start()
436    
437   if [[ -z $1 ]]   if [[ -z $1 ]]
438   then   then
439   ALL_INTERFACES=$(onboot_interface_list ${network_settings}/net.*)   ALL_INTERFACES=$(onboot_interface_list ${rc_network_settings}/net.*)
440   else   else
441   if [[ -e ${network_settings}/net.$1 ]]   if [[ -e ${rc_network_settings}/net.$1 ]]
442   then   then
443   ALL_INTERFACES="$1"   ALL_INTERFACES="$1"
444   else   else
445   ${FAILURE}   ${FAILURE}
446   echo "Interface $1 does not exist. Aborting"   rc_echo "Interface $1 does not exist. Aborting"
447   ${NORMAL}   ${NORMAL}
448   exit 1   exit 1
449   fi   fi
# Line 373  networking_start() Line 453  networking_start()
453   for iface in ${ALL_INTERFACES}   for iface in ${ALL_INTERFACES}
454   do   do
455   # checkconfig   # checkconfig
456   source ${network_settings}/net.${iface} || exit 1   source ${rc_network_settings}/net.${iface} || exit 1
457   checkconfig   checkconfig
458    
459   # setup mac   # setup mac
460   if [ -n "${FORCE_MAC_TO}" ]   if [[ -n ${FORCE_MAC_TO} ]]
461   then   then
462   echo -e ${COLOREDSTAR}"Faking MAC to ${FORCE_MAC_TO} for ${COLBLUE}${iface}${COLDEFAULT} ... "   rc_print "Faking MAC to ${FORCE_MAC_TO} for ${COLBLUE}${iface}${COLDEFAULT} ... "
463   ifconfig "${iface}" hw ether "${FORCE_MAC_TO}"   ifconfig "${iface}" hw ether "${FORCE_MAC_TO}"
464   evaluate_retval   evaluate_retval
465   fi   fi
# Line 387  networking_start() Line 467  networking_start()
467   # setup bridges   # setup bridges
468   if [[ ${iface} = br[0-9]* ]]   if [[ ${iface} = br[0-9]* ]]
469   then   then
470   config_bridge_devices ${iface} add   config_bridge_devices "${iface}" add
471   fi   fi
472    
  # activate the interface  
  ifconfig "${iface}" up  
   
473   # now configure wireless_extensions   # now configure wireless_extensions
474   [ -x /usr/sbin/iwconfig ] && setup_wireless_extensions "${iface}"   [ -x /usr/sbin/iwconfig ] && setup_wireless_extensions "${iface}"
475    
476   echo -e ${COLOREDSTAR}"Bringing up interface ${COLBLUE}${iface}${COLDEFAULT} ..."   rc_print "Bringing up interface ${COLBLUE}${iface}${COLDEFAULT} ..."
477    
478     # activate the interface
479     ifconfig "${iface}" up
480    
481   # setup static or dhcp   # setup static or dhcp
482   case ${NETWORKING} in   case ${NETWORKING} in
483   dhcp|DHCP)   dhcp|DHCP)
484   ${CURS_UP}   ${CURS_UP}
485   ${SET_WWCOL}   ${SET_WWCOL}
486   echo "[DHCP]"   rc_echo "[DHCP]"
487   loadproc ${DHCP_PROG} ${DHCP_START} "${iface}"   loadproc "${DHCP_PROG}" "${DHCP_START}" "${iface}"
488   ;;   ;;
489   static|STATIC)   static|STATIC)
490   ${CURS_UP}   ${CURS_UP}
491   ${SET_WWCOL}   ${SET_WWCOL}
492   echo "[STATIC]"   rc_echo "[STATIC]"
493   ifconfig "${iface}" "${IP}" netmask "${NETMASK}" broadcast "${BROADCAST}"   ifconfig "${iface}" "${IP}" netmask "${NETMASK}" broadcast "${BROADCAST}"
494   evaluate_retval   evaluate_retval
495   ;;   ;;
# Line 418  networking_start() Line 498  networking_start()
498   # setup def gw   # setup def gw
499   if [[ -n ${GATEWAY} ]]   if [[ -n ${GATEWAY} ]]
500   then   then
501   echo -e ${COLOREDSTAR}"Setting up default gateway for ${COLBLUE}${iface}${COLDEFAULT} ..."   rc_print "Setting up default gateway for ${COLBLUE}${iface}${COLDEFAULT} ..."
502   route add default gateway ${GATEWAY} metric 1 dev ${iface}   route add default gateway "${GATEWAY}" metric 1 dev "${iface}"
503   evaluate_retval   evaluate_retval
504    
505   unset GATEWAY   unset GATEWAY
506   fi   fi
507    
508   # setup /etc/resolv.conf   # setup /etc/resolv.conf
509     # add given nameserver
510   if [[ -n ${NAMESERVER} ]]   if [[ -n ${NAMESERVER} ]]
511   then   then
512   echo -e ${COLOREDSTAR}"Setting up all nameserver for ${COLBLUE}${iface}${COLDEFAULT} ..."   rc_print "Setting up all nameserver for ${COLBLUE}${iface}${COLDEFAULT} ..."
513    
514   # whipe out the old one   # whipe out the old one
515   echo "# Generated by the magellan-initscripts for ${iface}" > /etc/resolv.conf   echo "# Generated by the magellan-initscripts for ${iface}" > /etc/resolv.conf
516     # include head
517     if [ -f /etc/resolv.conf.head ]
518     then
519     cat /etc/resolv.conf.head >> /etc/resolv.conf
520     else
521     echo "# /etc/resolv.conf.head can replace this line" >> /etc/resolv.conf
522     fi
523    
524   for dns in ${NAMESERVER}   for dns in ${NAMESERVER}
525   do   do
526   echo "nameserver ${dns}" >> /etc/resolv.conf   echo "nameserver ${dns}" >> /etc/resolv.conf
527   done   done
528    
529     # include tail
530     if [ -f /etc/resolv.conf.tail ]
531     then
532     cat /etc/resolv.conf.tail >> /etc/resolv.conf
533     else
534     echo "# /etc/resolv.conf.tail can replace this line" >> /etc/resolv.conf
535     fi
536    
537   unset NAMESERVER   unset NAMESERVER
538   fi   fi
539   done   done
# Line 449  networking_stop() Line 546  networking_stop()
546  {  {
547   if [[ -z $1 ]]   if [[ -z $1 ]]
548   then   then
549   ALL_INTERFACES=$(onboot_interface_list ${network_settings}/net.*)   ALL_INTERFACES=$(onboot_interface_list ${rc_network_settings}/net.*)
550   else   else
551   if [[ -e ${network_settings}/net.$1 ]]   if [[ -e ${rc_network_settings}/net.$1 ]]
552   then   then
553   ALL_INTERFACES="$1"   ALL_INTERFACES="$1"
554   else   else
555   ${FAILURE}   ${FAILURE}
556   echo "Interface $1 does not exist. Aborting"   rc_echo "Interface $1 does not exist. Aborting"
557   ${NORMAL}   ${NORMAL}
558   exit 1   exit 1
559   fi   fi
# Line 465  networking_stop() Line 562  networking_stop()
562   # get list of all devices   # get list of all devices
563   for iface in ${ALL_INTERFACES}   for iface in ${ALL_INTERFACES}
564   do   do
565   source ${network_settings}/net.${iface} || exit 1   source ${rc_network_settings}/net.${iface} || exit 1
566   checkconfig   checkconfig
567    
568   if [[ -n ${GATEWAY} ]]   if [[ -n ${GATEWAY} ]]
569   then   then
570   echo -e ${COLOREDSTAR}"Removing default gateway ..."   rc_print "Removing default gateway ..."
571   route del -net default   route del -net default
572   evaluate_retval   evaluate_retval
573   fi   fi
574    
575   echo -e ${COLOREDSTAR}"Bringing down interface ${COLBLUE}${iface}${COLDEFAULT} ..."   rc_print "Bringing down interface ${COLBLUE}${iface}${COLDEFAULT} ..."
576   ifconfig ${iface} down   ifconfig "${iface}" down
577   evaluate_retval   evaluate_retval
578    
579   # remove bridges   # remove bridges
580   if [[ ${iface} = br[0-9]* ]]   if [[ ${iface} = br[0-9]* ]]
581   then   then
582   config_bridge_devices ${iface} remove   config_bridge_devices "${iface}" remove
583   fi   fi
584    
585   # shutdown dhcp-daemon   # shutdown dhcp-daemon
586   if [[ ${NETWORKING} = dhcp ]] && [[ -n $(pidof ${DHCP_PROG}) ]]   if [[ ${NETWORKING} = dhcp ]] && [[ -n $(pidof ${DHCP_PROG}) ]]
587   then   then
588   echo -e ${COLOREDSTAR}"Stopping the dhcp-daemon ..."   rc_print "Stopping the dhcp-daemon ..."
589   ${CURS_UP}   ${CURS_UP}
590   ${SET_WWCOL}   ${SET_WWCOL}
591   echo "[$(basename ${DHCP_PROG})]"   rc_echo "[$(basename ${DHCP_PROG})]"
592   ${DHCP_PROG} ${DHCP_STOP} "${iface}"   ${DHCP_PROG} ${DHCP_STOP} "${iface}"
593   evaluate_retval   evaluate_retval
594   fi   fi
# Line 533  case $1 in Line 630  case $1 in
630   ;;   ;;
631    
632   *)   *)
633   echo "Usage: $0 {start|stop|restart} [interface]"   rc_echo "Usage: $0 {start|stop|restart} [interface]"
634   exit 1   exit 1
635   ;;   ;;
636  esac  esac

Legend:
Removed from v.724  
changed lines
  Added in v.1227