#!/bin/ash
[ $# = 0 ] && { echo " $0 <group>"; exit; }
. /etc/functions.sh
+. /etc/network.overrides
+[ -e /etc/config/network ] && . /etc/config/network
+
type=$1
debug "### ifup $type ###"
mac=$(nvram get ${type}_hwaddr)
$DEBUG ifconfig $if down 2>&-
+pidfile=/var/run/${if}.pid
+[ -f $pidfile ] && $DEBUG kill $(cat $pidfile)
+
if [ "${if%%[0-9]}" = "br" ]; then
stp=$(nvram get ${type}_stp)
$DEBUG brctl delbr $if 2>&-
;;
dhcp)
ip=$(nvram get ${type}_ipaddr)
- [ -f $pidfile ] && $DEBUG kill $(cat $pidfile)
${DEBUG:-eval} "udhcpc -R -i $if ${ip:+-r $ip} -b -p $pidfile &"
;;
none|"")