From 6cefd0d79b470c0a0b028408aa3866f3c1ca4187 Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Tue, 24 Sep 2024 14:57:05 +0200 Subject: [PATCH 1/3] Add SIM card manifest entry --- providers/base/units/wwan/manifest.pxu | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/providers/base/units/wwan/manifest.pxu b/providers/base/units/wwan/manifest.pxu index 8420e2e794..42e4cd9512 100644 --- a/providers/base/units/wwan/manifest.pxu +++ b/providers/base/units/wwan/manifest.pxu @@ -8,3 +8,8 @@ unit: manifest entry id: has_wwan_module _name: A WWAN Module value-type: bool + +unit: manifest entry +id: has_sim_card +_name: A working SIM card inserted +value-type: bool From 9227cd7160426692c360fc74ff5b9fa8b7687e77 Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Tue, 24 Sep 2024 14:57:49 +0200 Subject: [PATCH 2/3] Add SIM card requirement on WWAN jobs needing it --- providers/base/units/wwan/jobs.pxu | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/providers/base/units/wwan/jobs.pxu b/providers/base/units/wwan/jobs.pxu index ca269e82e1..44ab7c84ee 100644 --- a/providers/base/units/wwan/jobs.pxu +++ b/providers/base/units/wwan/jobs.pxu @@ -54,6 +54,7 @@ imports: from com.canonical.plainbox import manifest depends: wwan/check-sim-present-{manufacturer}-{model}-{hw_id}-auto requires: manifest.has_wwan_module == 'True' + manifest.has_sim_card == 'True' snap.name == 'modem-manager' or package.name == 'modemmanager' unit: template @@ -74,6 +75,7 @@ flags: preserve-locale also-after-suspend preserve-cwd imports: from com.canonical.plainbox import manifest requires: manifest.has_wwan_module == 'True' + manifest.has_sim_card == 'True' snap.name == 'modem-manager' or package.name == 'modemmanager' unit: template @@ -100,6 +102,7 @@ flags: preserve-locale also-after-suspend preserve-cwd imports: from com.canonical.plainbox import manifest requires: manifest.has_wwan_module == 'True' + manifest.has_sim_card == 'True' snap.name == 'modem-manager' or package.name == 'modemmanager' unit: template @@ -122,6 +125,7 @@ depends: wwan/check-sim-present-{manufacturer}-{model}-{hw_id}-auto imports: from com.canonical.plainbox import manifest requires: manifest.has_wwan_module == 'True' + manifest.has_sim_card == 'True' snap.name == 'modem-manager' or package.name == 'modemmanager' id: wwan/detect-manual @@ -141,6 +145,7 @@ imports: from com.canonical.plainbox import manifest category_id: wwan requires: manifest.has_wwan_module == 'True' + manifest.has_sim_card == 'True' id: wwan/check-sim-present-manual plugin: manual @@ -159,6 +164,7 @@ imports: from com.canonical.plainbox import manifest category_id: wwan requires: manifest.has_wwan_module == 'True' + manifest.has_sim_card == 'True' depends: wwan/detect-manual @@ -191,6 +197,7 @@ category_id: wwan imports: from com.canonical.plainbox import manifest requires: manifest.has_wwan_module == 'True' + manifest.has_sim_card == 'True' depends: wwan/check-sim-present-manual @@ -231,5 +238,6 @@ category_id: wwan imports: from com.canonical.plainbox import manifest requires: manifest.has_wwan_module == 'True' + manifest.has_sim_card == 'True' depends: wwan/check-sim-present-manual From 427f80da00929ae29debd5c123988a623430f2e0 Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Tue, 24 Sep 2024 14:58:21 +0200 Subject: [PATCH 3/3] Align `requires` and `depends` fields in WWAN jobs Use 2 spaces instead of 4 to match the rest of the file. --- providers/base/units/wwan/jobs.pxu | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/providers/base/units/wwan/jobs.pxu b/providers/base/units/wwan/jobs.pxu index 44ab7c84ee..7f799cba13 100644 --- a/providers/base/units/wwan/jobs.pxu +++ b/providers/base/units/wwan/jobs.pxu @@ -144,7 +144,7 @@ flags: also-after-suspend imports: from com.canonical.plainbox import manifest category_id: wwan requires: - manifest.has_wwan_module == 'True' + manifest.has_wwan_module == 'True' manifest.has_sim_card == 'True' id: wwan/check-sim-present-manual @@ -163,10 +163,10 @@ flags: also-after-suspend imports: from com.canonical.plainbox import manifest category_id: wwan requires: - manifest.has_wwan_module == 'True' + manifest.has_wwan_module == 'True' manifest.has_sim_card == 'True' depends: - wwan/detect-manual + wwan/detect-manual id: wwan/gsm-connection-manual plugin: manual @@ -196,10 +196,10 @@ flags: also-after-suspend category_id: wwan imports: from com.canonical.plainbox import manifest requires: - manifest.has_wwan_module == 'True' + manifest.has_wwan_module == 'True' manifest.has_sim_card == 'True' depends: - wwan/check-sim-present-manual + wwan/check-sim-present-manual id: wwan/gsm-connection-interrupted-manual plugin: manual @@ -237,7 +237,7 @@ flags: also-after-suspend category_id: wwan imports: from com.canonical.plainbox import manifest requires: - manifest.has_wwan_module == 'True' + manifest.has_wwan_module == 'True' manifest.has_sim_card == 'True' depends: - wwan/check-sim-present-manual + wwan/check-sim-present-manual