diff options
Diffstat (limited to 'mobile_mm')
-rw-r--r-- | mobile_mm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mobile_mm b/mobile_mm index 35a08241cd6f..657d48fbc312 100644 --- a/mobile_mm +++ b/mobile_mm @@ -1,5 +1,5 @@ # Contributed by Max Wölfing <ff0x@infr.cat> -# Version: 0.0.8 +# Version: 0.0.9 # KNOWN BUGS: # - After suspend/hibernate the mobile broadband connection is not going to reconnect automatically (that's probably ok) @@ -121,6 +121,11 @@ function mobile_mm_up { local bearer bearer_interface bearer=$($__MMCLI -m "$MODEM" $(if [ "$NETCTL_DEBUG" == 'yes' ]; then echo '2>/dev/null'; fi) | sed -n 's#.*\(/org/.*/Bearer/[0-9]\+\).*#\1#p') + if [[ -z "$bearer" ]]; then + report_error "No bearer found!" + return 1 + fi + get_bearer_interface="$__MMCLI -m $MODEM -b $bearer | awk '/Status/ {for(i=1; i<5; i++) {getline; if ($2=="interface:") {gsub("\047","",$3); print $3}}}'" # Some modems need some time for the initialisation the connection |