syncdial.patch 882 B

123456789101112131415161718192021222324252627282930
  1. --- a/package/network/services/ppp/Makefile
  2. +++ b/package/network/services/ppp/Makefile
  3. @@ -39,7 +39,7 @@ endef
  4. define Package/ppp
  5. $(call Package/ppp/Default)
  6. - DEPENDS:=+kmod-ppp
  7. + DEPENDS:=+kmod-ppp +libpthread +shellsync +kmod-mppe
  8. TITLE:=PPP daemon
  9. VARIANT:=default
  10. endef
  11. --- a/package/network/services/ppp/files/ppp.sh
  12. +++ b/package/network/services/ppp/files/ppp.sh
  13. @@ -233,7 +233,15 @@ proto_pppoe_setup() {
  14. json_get_var padi_attempts padi_attempts
  15. json_get_var padi_timeout padi_timeout
  16. + syncppp_option=""
  17. + [ "$(uci get syncdial.config.enabled)" -eq "1" ] && {
  18. + ppp_if_cnt=$(uci show network | grep -c "\.proto=\'pppoe\'$")
  19. + syncppp_option="syncppp $ppp_if_cnt"
  20. + shellsync $ppp_if_cnt 10
  21. + }
  22. +
  23. ppp_generic_setup "$config" \
  24. + $syncppp_option \
  25. plugin rp-pppoe.so \
  26. ${ac:+rp_pppoe_ac "$ac"} \
  27. ${service:+rp_pppoe_service "$service"} \