Use replacedefaultroute in /etc/ppp/peers/provider instead of sudo route add default ppp0.

This commit is contained in:
Adrián Boimvaser 2021-01-28 11:17:28 -03:00
parent 0723497c6a
commit fe0c0d856f
4 changed files with 1 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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