hwname=$(nvram_get vlan${i}hwname)
hwaddr=$(nvram_get ${hwname}macaddr)
[ -z "$hwaddr" ] && return 1
hwname=$(nvram_get vlan${i}hwname)
hwaddr=$(nvram_get ${hwname}macaddr)
[ -z "$hwaddr" ] && return 1
if_list=$(nvram_get ${type}_ifnames)
for sif in $if_list; do {
if_valid $sif || continue
$DEBUG ifconfig $sif 0.0.0.0 up
if_list=$(nvram_get ${type}_ifnames)
for sif in $if_list; do {
if_valid $sif || continue
$DEBUG ifconfig $sif 0.0.0.0 up
if_proto=$(nvram_get ${type}_proto)
case "$if_proto" in
static)
if_ip=$(nvram_get ${type}_ipaddr)
if_netmask=$(nvram_get ${type}_netmask)
if_gateway=$(nvram_get ${type}_gateway)
if_proto=$(nvram_get ${type}_proto)
case "$if_proto" in
static)
if_ip=$(nvram_get ${type}_ipaddr)
if_netmask=$(nvram_get ${type}_netmask)
if_gateway=$(nvram_get ${type}_gateway)
- ipcalc -s "$if_gateway" || return
- $DEBUG route add default gw $if_gateway
+ $DEBUG ifconfig $if $if_ip ${if_netmask:+netmask $if_netmask} broadcast + up
+ ${if_gateway:+$DEBUG route add default gw $if_gateway}
;;
pppoe)
if_username=$(nvram_get ppp_username)
if_password=$(nvram_get ppp_passwd)
if_redial=$(nvram_get ppp_redialperiod)
if_idletime=$(nvram_get ppp_idletime)
;;
pppoe)
if_username=$(nvram_get ppp_username)
if_password=$(nvram_get ppp_passwd)
if_redial=$(nvram_get ppp_redialperiod)
if_idletime=$(nvram_get ppp_idletime)