diff options
author | John Crispin <john@openwrt.org> | 2014-10-08 08:01:20 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2014-10-08 08:01:20 +0000 |
commit | 90120bb7712361d67edb84faee78f2b191e1158b (patch) | |
tree | 09269a89a6d98cd7f0c5589f07ff37556b896e1c /package/network/utils/comgt/files/3g.sh | |
parent | 1df98fcd5adbf50c9fb0d2718879616d0e3c67b8 (diff) | |
download | master-31e0f0ae-90120bb7712361d67edb84faee78f2b191e1158b.tar.gz master-31e0f0ae-90120bb7712361d67edb84faee78f2b191e1158b.tar.bz2 master-31e0f0ae-90120bb7712361d67edb84faee78f2b191e1158b.zip |
wwan: add a generic 3g/4g proto
this proto handler will detect which of 3g, qmi, mbim, ncm or directip you need
for a stick and setup uci automagically
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 42837
Diffstat (limited to 'package/network/utils/comgt/files/3g.sh')
-rw-r--r-- | package/network/utils/comgt/files/3g.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/package/network/utils/comgt/files/3g.sh b/package/network/utils/comgt/files/3g.sh index deca2c95e2..968662675b 100644 --- a/package/network/utils/comgt/files/3g.sh +++ b/package/network/utils/comgt/files/3g.sh @@ -1,9 +1,13 @@ #!/bin/sh -INCLUDE_ONLY=1 -. ../netifd-proto.sh -. ./ppp.sh -init_proto "$@" +[ -n "$INCLUDE_ONLY" ] || { + NOT_INCLUDED=1 + INCLUDE_ONLY=1 + + . ../netifd-proto.sh + . ./ppp.sh + init_proto "$@" +} proto_3g_init_config() { no_device=1 @@ -26,6 +30,7 @@ proto_3g_setup() { json_get_var pincode pincode json_get_var dialnumber dialnumber + [ -n "$dat_device" ] && device=$dat_device [ -e "$device" ] || { proto_set_available "$interface" 0 return 1 @@ -101,4 +106,4 @@ proto_3g_teardown() { proto_kill_command "$interface" } -add_protocol 3g +[ -z "NOT_INCLUDED" ] || add_protocol 3g |