summaryrefslogtreecommitdiff
path: root/recipes-core/mlinux-scripts
diff options
context:
space:
mode:
authorJeff Hatch <jhatch@multitech.com>2019-02-28 09:16:58 -0600
committerJeff Hatch <jhatch@multitech.com>2019-02-28 09:17:40 -0600
commit55f83856fa2d0ab39b2a7167f6463dc45ce84c2c (patch)
treeef0d1c5e3a5e8d1f540e99f4e8e78a9e334439cd /recipes-core/mlinux-scripts
parente2c28a1a61b3315e9acc51be08c0e1fe859ca8e8 (diff)
downloadmeta-mlinux-atmel-55f83856fa2d0ab39b2a7167f6463dc45ce84c2c.tar.gz
meta-mlinux-atmel-55f83856fa2d0ab39b2a7167f6463dc45ce84c2c.tar.bz2
meta-mlinux-atmel-55f83856fa2d0ab39b2a7167f6463dc45ce84c2c.zip
Add lap3 support to mlinux-set-apn script
Diffstat (limited to 'recipes-core/mlinux-scripts')
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn12
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