From 469c6588985c280078952448876ebc6bf0e640af Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 7 Sep 2007 13:09:17 +0000 Subject: [PATCH] fix ppp unit number issues (#2178) SVN-Revision: 8665 --- package/ppp/files/ppp.sh | 9 ++++++--- 1 file 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() {