aboutsummaryrefslogtreecommitdiffstats
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
commitf49065167cab3c90369047c637eaf75e429e534f (patch)
treed23d8a1b2e12bd2b261495464620506ef2674145 /package/ppp/files
parent95f277fd2d7a280143cc8096709856b23b2401b9 (diff)
downloadmaster-187ad058-f49065167cab3c90369047c637eaf75e429e534f.tar.gz
master-187ad058-f49065167cab3c90369047c637eaf75e429e534f.tar.bz2
master-187ad058-f49065167cab3c90369047c637eaf75e429e534f.zip
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.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() {