diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-09-07 13:09:17 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-09-07 13:09:17 +0000 |
commit | 469c6588985c280078952448876ebc6bf0e640af (patch) | |
tree | c6478809570bf4fa07e2e473304d705f22c2c86b /package/ppp/files | |
parent | e3dc76af1b7ed7ccae6f1246c9cfd0cce60ced3e (diff) | |
download | mtk-20170518-469c6588985c280078952448876ebc6bf0e640af.zip mtk-20170518-469c6588985c280078952448876ebc6bf0e640af.tar.gz mtk-20170518-469c6588985c280078952448876ebc6bf0e640af.tar.bz2 |
fix ppp unit number issues (#2178)
SVN-Revision: 8665
Diffstat (limited to 'package/ppp/files')
-rw-r--r-- | package/ppp/files/ppp.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/package/ppp/files/ppp.sh b/package/ppp/files/ppp.sh index 9f50e85..5ca1cf9 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() { |