+ sleep 1
+
+ setup_interface "$device" "$config" "${ipproto:-dhcp}"
+ local gw="$(find_gw)"
+ [ -n "$gw" ] && {
+ route delete "$server" 2>/dev/null >/dev/null
+ route add "$server" gw "$gw"
+ }
+
+ # fix up the netmask
+ config_get netmask "$config" netmask
+ [ -z "$netmask" -o -z "$device" ] || ifconfig $device netmask $netmask
+
+ # make sure the network state references the correct ifname
+ scan_ppp "$config"
+ config_get ifname "$config" ifname
+ uci_set_state network "$config" ifname "$ifname"