diff options
author | Max Wölfing | 2019-03-21 09:51:48 +0100 |
---|---|---|
committer | Max Wölfing | 2019-03-21 09:51:48 +0100 |
commit | 1740383d114384cf18468775d4494c661e00b091 (patch) | |
tree | cfbd9fc5f865abbe297c9a3b1647cb46b2af397b | |
parent | 8fc013005a569369f62c7fc7c7c60337d5a66a73 (diff) | |
download | aur-1740383d114384cf18468775d4494c661e00b091.tar.gz |
Added debug output if bearer interface is not found
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | mobile_mm | 7 |
4 files changed, 12 insertions, 6 deletions
@@ -1,6 +1,6 @@ pkgbase = netctl-mm pkgdesc = Mobile broadband support for netctl using ModemManager - pkgver = 0.0.8 + pkgver = 0.0.9 pkgrel = 1 arch = any license = GPL @@ -9,7 +9,7 @@ pkgbase = netctl-mm source = mobile_mm.profile source = mobile_mm md5sums = 7b317a1f78ad63bfb8fb4973309883f5 - md5sums = 5f2102d6c6e58b15a056d4e1800c8a92 + md5sums = 9d3bcdaba9096d840bde6f4014bf175e pkgname = netctl-mm diff --git a/.gitignore b/.gitignore index 9960829d3268..0d32c7dcbd50 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -*.pkg.tar.xz +TODO Makefile +*.pkg.tar.xz @@ -1,6 +1,6 @@ # Maintainer: Max Wölfing <ff0x@infr.cat> pkgname=netctl-mm -pkgver=0.0.8 +pkgver=0.0.9 pkgrel=1 pkgdesc="Mobile broadband support for netctl using ModemManager" arch=(any) @@ -8,7 +8,7 @@ license=('GPL') depends=(netctl modemmanager) source=(mobile_mm.profile mobile_mm) md5sums=('7b317a1f78ad63bfb8fb4973309883f5' - '5f2102d6c6e58b15a056d4e1800c8a92') + '9d3bcdaba9096d840bde6f4014bf175e') package() { install -Dm644 "$srcdir/mobile_mm.profile" "$pkgdir/etc/netctl/examples/mobile_mm" 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 |