diff --git a/roles/network/templates/hostapd/hostapd.service.j2 b/roles/network/templates/hostapd/hostapd.service.j2 index fbbdd37fc..5c743898a 100644 --- a/roles/network/templates/hostapd/hostapd.service.j2 +++ b/roles/network/templates/hostapd/hostapd.service.j2 @@ -2,7 +2,7 @@ Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator Wants=network-pre.target After=network-pre.target -{% if is_rpi %} +{% if is_raspbian %} Before=dhcpcd.service {% endif %} Before=network.target diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index ac139711a..88c88201a 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -38,13 +38,18 @@ require dhcp_server_identifier slaac private # IIAB +denyinterfaces ap0 +# Setting iiab_wired_lan_iface would install the device as a slave under +# br0 so we need to turn off the dhcp client in that network layout. +# Auto creation of the wired slave is suppressed in discovered_network.yml +# -> Set iiab_wired_lan_iface if present is conditional on is_raspbian +# Slave creation can be forced by populating local_vars.yml with +# 'iiab_wired_lan_iface: eth0' which populates /etc/network/interfaces.d/iiab +# with 'bridge_ports eth0' in place of 'bridge_ports none' # Always (try) to run DHCP client on RPi's Ethernet port, for in-field # "cablemodems" used by many non-technical operators, who want Zero-Hassle # Updates. This means AVOIDING "denyinterfaces eth0" below: -{% if is_rpi and hostapd_enabled %} -denyinterfaces ap0 -{% endif %} {% if iiab_wired_lan_iface is defined %} denyinterfaces {{ iiab_wired_lan_iface }} {% endif %} diff --git a/roles/network/templates/network/rpi.j2 b/roles/network/templates/network/rpi.j2 index 9e3c1b69b..a2860fb95 100644 --- a/roles/network/templates/network/rpi.j2 +++ b/roles/network/templates/network/rpi.j2 @@ -3,6 +3,8 @@ # gui_desired_network_role is {{ gui_desired_network_role }} {% endif %} {% if iiab_network_mode != "Appliance" %} +# auto wired slave creation is suppressed in detected_network.yml +# 'none' would become the name of the wired slave device. ################# LANCONTROLLER ################### auto br0 iface br0 inet manual