summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
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 9f50e85ef..5ca1cf9c7 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() {