diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2024-04-26 14:50:22 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2024-04-30 05:48:58 +0000 |
commit | 09c302d7e57a0fdb6c51ae8f61d5ad6371a30b67 (patch) | |
tree | 5c723fa4dca7c3f5e1550c57486a9c77c412a691 /op-mode-definitions | |
parent | aa15f74818ca2cb35696315cc5cb0c57335f6911 (diff) | |
download | vyos-1x-09c302d7e57a0fdb6c51ae8f61d5ad6371a30b67.tar.gz vyos-1x-09c302d7e57a0fdb6c51ae8f61d5ad6371a30b67.zip |
T6267: Check interface wireless module before apply config
Check if the wireless device/modem exists in the system and the
module `ieee802111` was loaded
In cases where we do not have wireless devices, it prevents the
unexpected traceback
```
set interfaces wireless wlan0 address 192.0.2.5/32
commit
Traceback (most recent call last):
File "/usr/libexec/vyos/conf_mode/interfaces_wireless.py", line 269, in <modu>
c = get_config()
^^^^^^^^^^^^
File "/usr/libexec/vyos/conf_mode/interfaces_wireless.py", line 104, in get_cg
tmp = find_other_stations(conf, base, wifi['ifname'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/libexec/vyos/conf_mode/interfaces_wireless.py", line 54, in find_os
for phy in os.listdir('/sys/class/ieee80211'):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/ieee80211'
```
Diffstat (limited to 'op-mode-definitions')
0 files changed, 0 insertions, 0 deletions