4 . /lib/network/config.sh
11 PPP_IPPARAM="$(echo $6 | sed 's/\./_/g')"
13 export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
14 [ -z "$PPP_IPPARAM" -o -z "$PPP_LOCAL" ] || {
15 uci_set_state network "$PPP_IPPARAM" ifname "$PPP_IFACE"
16 uci_set_state network "$PPP_IPPARAM" ipaddr "$PPP_LOCAL"
17 uci_set_state network "$PPP_IPPARAM" gateway "$PPP_REMOTE"
19 local dns="$DNS1${DNS2:+ $DNS2}"
20 [ -n "$dns" ] && add_dns "$PPP_IPPARAM" $dns
23 [ -z "$PPP_IPPARAM" ] || {
25 # only handle uci managed interfaces here, others are done by generic hotplug
26 3g-*|ppp-*|pppoa-*|pppoe-*|pptp-*)
27 env -i ACTION="ifup" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
32 [ -d /etc/ppp/ip-up.d ] && {
33 for SCRIPT in /etc/ppp/ip-up.d/*
35 [ -x "$SCRIPT" ] && "$SCRIPT" "$@"