fix issues with multiple ppp links (noticed by Stefano Rivera)
authorFelix Fietkau <nbd@openwrt.org>
Fri, 31 Aug 2007 16:19:19 +0000 (16:19 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 31 Aug 2007 16:19:19 +0000 (16:19 +0000)
SVN-Revision: 8563

package/ppp/files/ppp.sh

index 507f453fcd116fa23819eeec144348e124f68d24..84def1285b159bf2230381e69fe9af0ee461f47c 100644 (file)
@@ -3,6 +3,7 @@ scan_ppp() {
        pppdev="${pppdev:-0}"
        config_set "$1" ifname "ppp$pppdev"
        config_set "$1" unit "$pppdev"
+       pppdev="$(($pppdev + 1))"
 }
 
 start_pppd() {
@@ -38,6 +39,7 @@ start_pppd() {
                defaultroute \
                replacedefaultroute \
                ${username:+user "$username" password "$password"} \
+               unit "$pppdev" \
                linkname "$cfg" \
                ipparam "$cfg" \
                ${connect:+connect "$connect"} \