summaryrefslogtreecommitdiff
path: root/recipes-core/mlinux-scripts/mlinux-scripts-1.1
diff options
context:
space:
mode:
authorJeff Hatch <jhatch@multitech.com>2019-02-28 09:16:58 -0600
committerJohn Klug <john.klug@multitech.com>2019-07-03 17:08:20 -0500
commit6d4ce20597b2cfab1b0737261d1273776e1a1b73 (patch)
treeef0d1c5e3a5e8d1f540e99f4e8e78a9e334439cd /recipes-core/mlinux-scripts/mlinux-scripts-1.1
parent1e920f77156edf2550520a194821e44515d065d5 (diff)
downloadmeta-mlinux-6d4ce20597b2cfab1b0737261d1273776e1a1b73.tar.gz
meta-mlinux-6d4ce20597b2cfab1b0737261d1273776e1a1b73.tar.bz2
meta-mlinux-6d4ce20597b2cfab1b0737261d1273776e1a1b73.zip
Add lap3 support to mlinux-set-apn script
Diffstat (limited to 'recipes-core/mlinux-scripts/mlinux-scripts-1.1')
-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