[package] ppp:
[openwrt/svn-archive/archive.git] / package / ppp / files / etc / ppp / ip-up
index 4b44b25d0bab0f77179f7da6e8aac7e019ae5a71..38959295394bd811d499e99044202726ba5cbd9c 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/sh
+
 . /etc/functions.sh
+. /lib/network/config.sh
+
 PPP_IFACE="$1"
 PPP_TTY="$2"
 PPP_SPEED="$3"
@@ -14,8 +17,9 @@ export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
        uci_set_state network "$PPP_IPPARAM" gateway "$PPP_REMOTE"
 
        local dns="$DNS1${DNS2:+ $DNS2}"
-       [ -n "$dns" ] && uci_set_state network "$PPP_IPPARAM" dns "$dns"
+       [ -n "$dns" ] && add_dns "$PPP_IPPARAM" $dns
 }
+
 [ -z "$PPP_IPPARAM" ] || env -i ACTION="ifup" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
 
 [ -d /etc/ppp/ip-up.d ] && {