ee22151b9ff870733ede78f26728fc11f69e24b9
[openwrt/svn-archive/archive.git] / package / ppp / files / lib / netifd / ppp-up
1 #!/bin/sh
2 PPP_IPPARAM="$6"
3
4 . /lib/netifd/netifd-proto.sh
5 proto_init_update "$IFNAME" 1 1
6 proto_set_keep 1
7 [ -n "$PPP_IPPARAM" ] && {
8 [
9 [ -n "$IPLOCAL" ] && proto_add_ipv4_address "$IPREMOTE" 32
10 [ -n "$IPREMOTE" ] && proto_add_ipv4_route 0.0.0.0 0 "$IPREMOTE"
11 [ -n "$LLLOCAL" ] && proto_add_ipv6_address "$LLLOCAL" 128
12 [ -n "$LLREMOTE" ] && proto_add_ipv6_route "::0" 0 "$LLREMOTE"
13 [ -n "$DNS1" ] && proto_add_dns_server "$DNS1"
14 [ -n "$DNS2" -a "$DNS1" != "$DNS2" ] && proto_add_dns_server "$DNS2"
15 }
16 proto_send_update "$PPP_IPPARAM"
17