diff options
author | Jeff Hatch <jhatch@multitech.com> | 2019-02-28 09:16:58 -0600 |
---|---|---|
committer | Jeff Hatch <jhatch@multitech.com> | 2019-02-28 09:16:58 -0600 |
commit | 2d76b2bca0539ac7cfc3b02d187978c4232441d8 (patch) | |
tree | ba52f132b7b4d23e84797eb7c015b4360f69e8a2 | |
parent | 83b4e7dd752355b161e7c13438a84e381d776ac7 (diff) | |
download | meta-mlinux-2d76b2bca0539ac7cfc3b02d187978c4232441d8.tar.gz meta-mlinux-2d76b2bca0539ac7cfc3b02d187978c4232441d8.tar.bz2 meta-mlinux-2d76b2bca0539ac7cfc3b02d187978c4232441d8.zip |
Add lap3 support to mlinux-set-apn script
-rwxr-xr-x | recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn index 8c59c78..3d02e16 100755 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn @@ -26,6 +26,7 @@ leu1_chat_file=/etc/ppp/peers/leu1_chat lna3_chat_file=/etc/ppp/peers/lna3_chat_non_vz lna3_chat_link=/etc/ppp/peers/lna3_chat lna3_readme=/etc/ppp/peers/README.lna3 +lap3_chat_link=/etc/ppp/peers/lap3_chat function usage { echo "Usage: $(basename $0) [--] APN" @@ -68,6 +69,7 @@ if ((clear != 1)) ; then else echo "Failed to set APN in $gsm_chat_file" fi + echo "Not allowed to set APN for $lsp3_chat_file" echo "Not allowed to set APN for $lvw2_chat_file" # We cannot set the APN for a Verizon modem # sed -r -i "s/^(#comment by mlinux-set-apn )*OK\s+'AT\+CGDCONT=3,\"IPV4V6\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=3,\"IPV4V6\",\"${apn}\"'/" $lvw2_chat_file @@ -81,6 +83,11 @@ if ((clear != 1)) ; then else echo "Failed to set APN in $lna3_chat_file" fi + if sed -r -i "s/^(#comment by mlinux-set-apn )*OK\s+'AT\+CGDCONT=([0-9]*),\"([^\"]*)\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=\2,\"\3\",\"${apn}\"'/" $lap3_chat_file ; then + echo "Set APN to \"${apn}\" in $lap3_chat_file" + else + echo "Failed to set APN in $lap3_chat_file" + fi else if sed -r -i "s/^(OK\s+'AT\+CGDCONT=[0-9]*,\"[^\"]*\",\"[^\"]*\"'$)/#comment by mlinux-set-apn \1/" $gsm_chat_file ; then echo "Commented out APN in $gsm_chat_file" @@ -101,6 +108,11 @@ else else echo "Failed to comment out APN in $lna3_chat_file" fi + if sed -r -i "s/^(OK\s+'AT\+CGDCONT=[0-9]*,\"[^\"]*\",\"[^\"]*\"'$)/#comment by mlinux-set-apn \1/" $lap3_chat_file ; then + echo "Commented out APN in $lap3_chat_file" + else + echo "Failed to comment out APN in $lap3_chat_file" + fi fi exit 0 |