X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/17b183947df361ae3a3db50a0e29428b6725b82b..ebe4d354283f45ba15f83d080e8a93a46ee29a9e:/package/ppp/files/ppp.sh?ds=sidebyside 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() {