summaryrefslogtreecommitdiff
path: root/recipes-core/mlinux-scripts
diff options
context:
space:
mode:
authorBrandon Bayer <bbayer@multitech.com>2016-04-04 15:16:43 -0500
committerBrandon Bayer <bbayer@multitech.com>2016-04-04 15:16:43 -0500
commit344a262d83c358f9dcc645b4890dded3e14ec88a (patch)
tree1de1e3a18ce2f03ff94fdb96b6ba3a2a4694c2a4 /recipes-core/mlinux-scripts
parentecd99ab85433abad7a463b9961c1656c1128df74 (diff)
downloadmeta-mlinux-344a262d83c358f9dcc645b4890dded3e14ec88a.tar.gz
meta-mlinux-344a262d83c358f9dcc645b4890dded3e14ec88a.tar.bz2
meta-mlinux-344a262d83c358f9dcc645b4890dded3e14ec88a.zip
ppp:feat: add lvw2 chat script
Diffstat (limited to 'recipes-core/mlinux-scripts')
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.0/mlinux-set-apn8
1 files changed, 5 insertions, 3 deletions
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.0/mlinux-set-apn b/recipes-core/mlinux-scripts/mlinux-scripts-1.0/mlinux-set-apn
index 371ba7e..65e01b8 100755
--- a/recipes-core/mlinux-scripts/mlinux-scripts-1.0/mlinux-set-apn
+++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.0/mlinux-set-apn
@@ -26,15 +26,17 @@ if [[ $# != 1 ]]; then
fi
apn=$1
-chat_file=/etc/ppp/peers/gsm_chat
+gsm_chat_file=/etc/ppp/peers/gsm_chat
+lvw2_chat_file=/etc/ppp/peers/lvw2_chat
-sed -r -i "s/^OK\s+'AT\+CGDCONT=1,\"IP\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=1,\"IP\",\"${apn}\"'/" $chat_file
+sed -r -i "s/^OK\s+'AT\+CGDCONT=1,\"IP\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=1,\"IP\",\"${apn}\"'/" $gsm_chat_file
+sed -r -i "s/^OK\s+'AT\+CGDCONT=3,\"IPV4V6\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=3,\"IPV4V6\",\"${apn}\"'/" $lvw2_chat_file
if [[ $? != 0 ]]; then
echo "Failed to change APN"
exit 1
else
- echo "Set APN to \"${apn}\" in $chat_file"
+ echo "Set APN to \"${apn}\" in $gsm_chat_file and $lvw2_chat_file"
fi
exit 0