diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-09-07 13:09:17 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-09-07 13:09:17 +0000 |
commit | de3a8f9eb7deb59a418293ffcd6c8111c775075f (patch) | |
tree | d23d8a1b2e12bd2b261495464620506ef2674145 /package/ppp/files | |
parent | d275f1aba06f50c81579c890b6d187ced69d59ee (diff) |
fix ppp unit number issues (#2178)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8665 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ppp/files')
-rw-r--r-- | package/ppp/files/ppp.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/package/ppp/files/ppp.sh b/package/ppp/files/ppp.sh index 9f50e85ef2..5ca1cf9c7d 100644 --- a/package/ppp/files/ppp.sh +++ b/package/ppp/files/ppp.sh @@ -1,9 +1,12 @@ scan_ppp() { config_get ifname "$1" ifname pppdev="${pppdev:-0}" - config_set "$1" ifname "ppp$pppdev" - config_set "$1" unit "$pppdev" - pppdev="$(($pppdev + 1))" + config_get unit "$1" unit + [ -z "$unit" ] && { + config_set "$1" ifname "ppp$pppdev" + config_set "$1" unit "$pppdev" + pppdev="$(($pppdev + 1))" + } } start_pppd() { |