summaryrefslogtreecommitdiff
path: root/package/ppp/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-09-07 13:09:17 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-09-07 13:09:17 +0000
commit469c6588985c280078952448876ebc6bf0e640af (patch)
treec6478809570bf4fa07e2e473304d705f22c2c86b /package/ppp/files
parente3dc76af1b7ed7ccae6f1246c9cfd0cce60ced3e (diff)
downloadmtk-20170518-469c6588985c280078952448876ebc6bf0e640af.zip
mtk-20170518-469c6588985c280078952448876ebc6bf0e640af.tar.gz
mtk-20170518-469c6588985c280078952448876ebc6bf0e640af.tar.bz2
fix ppp unit number issues (#2178)
SVN-Revision: 8665
Diffstat (limited to 'package/ppp/files')
-rw-r--r--package/ppp/files/ppp.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/package/ppp/files/ppp.sh b/package/ppp/files/ppp.sh
index 9f50e85..5ca1cf9 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() {