2 [ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
5 .
/lib
/netifd
/netifd-proto.sh
7 set_classless_routes
() {
10 while [ -n "$1" -a -n "$2" -a $max -gt 0 ]; do
11 proto_add_ipv4_route
"${1%%/*}" "${1##*/}" "$2"
18 proto_init_update
"*" 1
19 proto_add_ipv4_address
"$ip" "${subnet:-255.255.255.0}"
20 # TODO: apply $broadcast
23 proto_add_ipv4_route
0.0.0.0 0 "$i"
26 # CIDR STATIC ROUTES (rfc3442)
27 [ -n "$staticroutes" ] && set_classless_routes
$staticroutes
28 [ -n "$msstaticroutes" ] && set_classless_routes
$msstaticroutes
31 proto_add_dns_server
"$dns"
33 for domain
in $domain; do
34 proto_add_dns_search
"$domain"
36 proto_send_update
"$INTERFACE"
39 # [ -n "$ntpsrv" ] && change_state network "$ifc" lease_ntpsrv "$ntpsrv"
40 # [ -n "$timesvr" ] && change_state network "$ifc" lease_timesrv "$timesvr"
41 # [ -n "$hostname" ] && change_state network "$ifc" lease_hostname "$hostname"
42 # [ -n "$timezone" ] && change_state network "$ifc" lease_timezone "$timezone"
45 deconfig_interface
() {
46 proto_init_update
"*" 0
47 proto_send_update
"$INTERFACE"