diff options
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 deca2c9..9686626 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 |