Merge ~sylvain-pineau/plainbox-provider-resource:fix-1863725 into plainbox-provider-resource:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: c5de7490b7782d20b8ce16e277c407da201895ae
Merged at revision: f6501cef628899ce59ad8b5001c8e76e443936ac
Proposed branch: ~sylvain-pineau/plainbox-provider-resource:fix-1863725
Merge into: plainbox-provider-resource:master
Diff against target: 37 lines (+2/-12)
1 file modified
bin/mobilebroadband_resource (+2/-12)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+379452@code.launchpad.net

Description of the change

Fixes the linked bug

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Tested on the lab system prepared by Gene

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/bin/mobilebroadband_resource b/bin/mobilebroadband_resource
index 6b7e347..10e9adc 100755
--- a/bin/mobilebroadband_resource
+++ b/bin/mobilebroadband_resource
@@ -2,7 +2,7 @@
2#2#
3# This file is part of Checkbox.3# This file is part of Checkbox.
4#4#
5# Copyright 2014 Canonical Ltd.5# Copyright 2014-2020 Canonical Ltd.
6#6#
7# Checkbox is free software: you can redistribute it and/or modify7# Checkbox is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License version 3,8# it under the terms of the GNU General Public License version 3,
@@ -22,7 +22,7 @@ MMCLI_PATH=$(which mmcli)
2222
23if [ -x "$MMCLI_PATH" ]; then23if [ -x "$MMCLI_PATH" ]; then
24 # Use mmcli to query for modem capabilities24 # Use mmcli to query for modem capabilities
25 for i in $(mmcli --simple-status -L | \25 for i in $(mmcli --simple-status -L 2>/dev/null || mmcli -L | \
26 awk '/freedesktop\/ModemManager1\/Modem/ {print $1;}'); do26 awk '/freedesktop\/ModemManager1\/Modem/ {print $1;}'); do
27 mmcli -m $i |grep -q "supported: .*gsm-umts.*" && GSM=yes27 mmcli -m $i |grep -q "supported: .*gsm-umts.*" && GSM=yes
28 mmcli -m $i |grep -q "supported: .*cdma.*" && CDMA=yes28 mmcli -m $i |grep -q "supported: .*cdma.*" && CDMA=yes
@@ -32,15 +32,5 @@ if [ -x "$MMCLI_PATH" ]; then
32 # really failed :D32 # really failed :D
33 [ "$GSM" = "yes" ] && echo "gsm: supported" || true33 [ "$GSM" = "yes" ] && echo "gsm: supported" || true
34 [ "$CDMA" = "yes" ] && echo "cdma: supported" || true34 [ "$CDMA" = "yes" ] && echo "cdma: supported" || true
35else
36 # Fall back to old mm-test script
37 if mm-test --no-scan | grep -q 'GSM modem'
38 then
39 echo "gsm: supported"
40 fi
41 if mm-test --no-scan | grep -q 'CDMA modem'
42 then
43 echo "cdma: supported"
44 fi
45fi35fi
4636

Subscribers

People subscribed via source and target branches