aboutsummaryrefslogtreecommitdiffstats
path: root/package
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
parente3dc76af1b7ed7ccae6f1246c9cfd0cce60ced3e (diff)
downloadupstream-469c6588985c280078952448876ebc6bf0e640af.tar.gz
upstream-469c6588985c280078952448876ebc6bf0e640af.tar.bz2
upstream-469c6588985c280078952448876ebc6bf0e640af.zip
fix ppp unit number issues (#2178)
SVN-Revision: 8665
Diffstat (limited to 'package')
-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 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() {