acbb5997ae4ee90c20bbbd6470a87d92ee8a393a
[openwrt.git] / package / ppp / files / etc / ppp / ip-up
1 #!/bin/sh
2 PPP_IFACE="$1"
3 PPP_TTY="$2"
4 PPP_SPEED="$3"
5 PPP_LOCAL="$4"
6 PPP_REMOTE="$5"
7 PPP_IPPARAM="$6"
8 export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
9 [ -z "$PPP_IPPARAM" ] || env -i ACTION="ifup" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
10 [ -z "$PPP_IPPARAM" -o -z "$PPP_LOCAL" ] || {
11 uci_set_state network "$PPP_IPPARAM" ipaddr "$PPP_LOCAL"
12 uci_set_state network "$PPP_IPPARAM" gateway "$PPP_REMOTE"
13 }
14
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 }
This page took 0.053043 seconds and 3 git commands to generate.