summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Wölfing2019-03-21 09:51:48 +0100
committerMax Wölfing2019-03-21 09:51:48 +0100
commit1740383d114384cf18468775d4494c661e00b091 (patch)
treecfbd9fc5f865abbe297c9a3b1647cb46b2af397b
parent8fc013005a569369f62c7fc7c7c60337d5a66a73 (diff)
downloadaur-1740383d114384cf18468775d4494c661e00b091.tar.gz
Added debug output if bearer interface is not found
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD4
-rw-r--r--mobile_mm7
4 files changed, 12 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3bcceaf2c255..64aa68decd89 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index d76d75467634..1c632b18aa2a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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