From fe0c0d856f97e75ae9a2242e68d9e53254f557d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Boimvaser?= Date: Thu, 28 Jan 2021 11:17:28 -0300 Subject: [PATCH] Use `replacedefaultroute` in `/etc/ppp/peers/provider` instead of `sudo route add default ppp0`. --- ppp_install.sh | 4 ---- ppp_install_jetson.sh | 4 ---- ppp_install_standalone.sh | 4 ---- src/provider | 1 + 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/ppp_install.sh b/ppp_install.sh index c9a2054..714f5db 100755 --- a/ppp_install.sh +++ b/ppp_install.sh @@ -205,10 +205,6 @@ sed -i "s/#APN/$carrierapn/" provider sed -i "s/#DEVICE/$devicename/" provider mv provider /etc/ppp/peers/provider -if ! (grep -q 'sudo route' /etc/ppp/ip-up ); then - echo "sudo route add default ppp0" >> /etc/ppp/ip-up -fi - if [[ $shield_hat -eq 2 ]] || [[ $shield_hat -eq 6 ]]; then if ! (grep -q 'max_usb_current' /boot/config.txt ); then echo "max_usb_current=1" >> /boot/config.txt diff --git a/ppp_install_jetson.sh b/ppp_install_jetson.sh index 9db430c..54301aa 100755 --- a/ppp_install_jetson.sh +++ b/ppp_install_jetson.sh @@ -132,9 +132,5 @@ sed -i "s/#APN/$carrierapn/" provider sed -i "s/#DEVICE/$devicename/" provider mv provider /etc/ppp/peers/provider -if ! (grep -q 'sudo route' /etc/ppp/ip-up ); then - echo "sudo route add default ppp0" >> /etc/ppp/ip-up -fi - read -p "Press ENTER key to reboot" ENTER reboot \ No newline at end of file diff --git a/ppp_install_standalone.sh b/ppp_install_standalone.sh index fc25a5d..402e6cf 100755 --- a/ppp_install_standalone.sh +++ b/ppp_install_standalone.sh @@ -210,10 +210,6 @@ sed -i "s/#APN/$carrierapn/" provider sed -i "s/#DEVICE/$devicename/" provider mv provider /etc/ppp/peers/provider -if ! (grep -q 'sudo route' /etc/ppp/ip-up ); then - echo "sudo route add default ppp0" >> /etc/ppp/ip-up -fi - if [[ $shield_hat -eq 2 ]] || [[ $shield_hat -eq 6 ]]; then if ! (grep -q 'max_usb_current' /boot/config.txt ); then echo "max_usb_current=1" >> /boot/config.txt diff --git a/src/provider b/src/provider index fe32465..2a427a8 100644 --- a/src/provider +++ b/src/provider @@ -13,6 +13,7 @@ persist debug # If you want to use the HSDPA link as your gateway defaultroute +replacedefaultroute # pppd must not propose any IP address to the peer noipdefault # No ppp compression