1#!/bin/sh 2PPP_IPPARAM="$6" 3 4. /lib/netifd/netifd-proto.sh 5proto_init_update "$IFNAME" 1 1 6proto_set_keep 1 7[ -n "$PPP_IPPARAM" ] && { 8 [ -n "$IPLOCAL" ] && proto_add_ipv4_address "$IPLOCAL" 32 "" "${IPREMOTE:-2.2.2.2}" 9 [ -n "$IPREMOTE" ] && proto_add_ipv4_route 0.0.0.0 0 "$IPREMOTE" 10 [ -n "$LLLOCAL" ] && proto_add_ipv6_address "$LLLOCAL" 128 11 [ -n "$DNS1" ] && proto_add_dns_server "$DNS1" 12 [ -n "$DNS2" -a "$DNS1" != "$DNS2" ] && proto_add_dns_server "$DNS2" 13} 14proto_send_update "$PPP_IPPARAM" 15 16[ -d /etc/ppp/ip-up.d ] && { 17 for SCRIPT in /etc/ppp/ip-up.d/* 18 do 19 [ -x "$SCRIPT" ] && "$SCRIPT" "$@" 20 done 21} 22 23if [ -n "$AUTOIPV6" ]; then 24 json_init 25 json_add_string name "${PPP_IPPARAM}_6" 26 json_add_string ifname "@$PPP_IPPARAM" 27 json_add_string proto "dhcpv6" 28 [ -n "$EXTENDPREFIX" ] && json_add_string extendprefix 1 29 json_close_object 30 ubus call network add_dynamic "$(json_dump)" 31fi 32