diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-05-25 18:04:46 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-25 18:04:46 +0300 |
| commit | 85872cc0de6ef92d3e36f328c0e9a357ddfbb605 (patch) | |
| tree | 6fdc12eb619911258c881324cf5093323829d8ee /src | |
| parent | dc47f550e908eb4252ab2a30791b851403a3feae (diff) | |
| parent | 8a537e8097ac80c696299d267e1dd1c9b6000bab (diff) | |
| download | vyos-1x-85872cc0de6ef92d3e36f328c0e9a357ddfbb605.tar.gz vyos-1x-85872cc0de6ef92d3e36f328c0e9a357ddfbb605.zip | |
Merge pull request #5216 from natali-rs1985/T8412
wwan: T8412: Fix commit failure when modem is absent or not connected
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/interfaces_wwan.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces_wwan.py b/src/conf_mode/interfaces_wwan.py index 166b857a8..ad6c806ad 100755 --- a/src/conf_mode/interfaces_wwan.py +++ b/src/conf_mode/interfaces_wwan.py @@ -149,9 +149,15 @@ def apply(wwan): modem = wwan['ifname'].lstrip('wwan') base_cmd = f'mmcli --modem {modem}' # Number of bearers is limited - always disconnect first - cmd(f'{base_cmd} --simple-disconnect') + call(f'{base_cmd} --simple-disconnect') w = WWANIf(wwan['ifname']) + + # We cannot proceed with the configuration if the modem is not detected - so we bail out + # and wait for the next cronjob run to re-apply the configuration. + if not w.exists(wwan['ifname']): + return None + if 'deleted' in wwan or 'disable' in wwan: w.remove() |
