1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-14 20:22:08 +00:00

Merge pull request #3390 from jvonau/3385

3385 Ignore detected wifi device from LAN detection when not currently active.
This commit is contained in:
A Holt 2022-10-04 09:34:53 -04:00 committed by GitHub
commit 38fa807a00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View file

@ -55,7 +55,7 @@ strict_networking: False
iiab_demo_mode: False
gui_static_wan: False
wan_cidr: ""
virtual_network_devices: "-e ap0 -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth"
virtual_network_devices: "-e wwlan -e ppp -e ap0 -e lo -e br0 -e tun -e br- -e docker -e bridge0 -e veth"
# Set defaults for discovery process as strings
wifi1: "not found-1"

View file

@ -166,7 +166,7 @@
when: reserved_device is defined
- name: Count LAN ifaces
shell: ls /sys/class/net | grep -v {{ virtual_network_devices }} -e wwlan -e ppp -e {{ device_gw }} -e {{ exclude_devices }} | wc -l
shell: ls /sys/class/net | grep -v {{ virtual_network_devices }} -e {{ discovered_wireless_iface }} -e {{ device_gw }} -e {{ exclude_devices }} | wc -l
register: num_lan_interfaces_result
- name: Calculate number of LAN interfaces including WiFi
@ -175,7 +175,7 @@
# LAN - pick non WAN's
- name: Create list of LAN (non WAN) ifaces
shell: ls /sys/class/net | grep -v {{ virtual_network_devices }} -e wwlan -e ppp -e {{ device_gw }} -e {{ exclude_devices }}
shell: ls /sys/class/net | grep -v {{ virtual_network_devices }} -e {{ discovered_wireless_iface }} -e {{ device_gw }} -e {{ exclude_devices }}
when: num_lan_interfaces != "0"
register: lan_list_result

View file

@ -64,8 +64,8 @@
- name: Clone wifi if needed
systemd:
name: iiab-clone-wifi
state: started
when: wifi_up_down and discovered_wireless_iface != "none"
state: restarted
when: wifi_up_down and can_be_ap and ansible_ap0 is undefined
- name: Restart the networking service if appropriate
systemd:

View file

@ -54,8 +54,8 @@
- name: Clone wifi if needed
systemd:
name: iiab-clone-wifi
state: started
when: wifi_up_down and discovered_wireless_iface != "none"
state: restarted
when: wifi_up_down and can_be_ap and ansible_ap0 is undefined
- name: Enable & Restart systemd-networkd.service
systemd:

View file

@ -1,6 +1,6 @@
# /etc/systemd/network/IIAB-Slave-{{ iiab_wired_lan_iface }}.network
# /etc/systemd/network/IIAB-Slave-{{ item|trim }}.network
[Match]
Name={{ iiab_wired_lan_iface }}
Name={{ item|trim }}
[Link]
RequiredForOnline=no