mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
use hostapd.yml supplied templates sooner - remove systemd reload and restarted - move restarted to restart.yml live testing
53 lines
1.6 KiB
Django/Jinja
53 lines
1.6 KiB
Django/Jinja
# iiab_network_mode is {{ iiab_network_mode }}
|
|
# gui_desired_network_role is {{ gui_desired_network_role }}
|
|
|
|
{% if iiab_network_mode != "Appliance" %}
|
|
################# LANCONTROLLER ###################
|
|
auto br0
|
|
{% if dhcpcd_result == "enabled" %}
|
|
iface br0 inet manual
|
|
{% else %}
|
|
iface br0 inet static
|
|
{% endif %}
|
|
{% if discovered_lan_iface != "none" %}
|
|
bridge_ports {{ discovered_lan_iface }}
|
|
{% endif %}
|
|
bridge_maxwait 0
|
|
{% if dhcpcd_result != "enabled" %}
|
|
address {{ lan_ip }}
|
|
netmask {{ lan_netmask }}
|
|
{% endif %}
|
|
dns-nameservers 127.0.0.1
|
|
dns-search {{ iiab_domain }}
|
|
{% endif %}
|
|
{# end LANCONTROLLER #}
|
|
|
|
{% if iiab_network_mode != "LanController" %}
|
|
################# GATEWAY or APPLIANCE #########################
|
|
# start dhcp clients
|
|
{% if dhcpcd_result == "enabled" or wan_in_interfaces == "true" %}
|
|
# client or user defined
|
|
{% endif %}
|
|
{% if dhcpcd_result == "enabled" and is_rpi == "true" %}
|
|
#cover rpi
|
|
#auto {{ iiab_wan_iface }}
|
|
#iface {{ iiab_wan_iface }} inet manual
|
|
{% endif %}
|
|
{% if dhcpcd_result != "enabled" and wan_in_interfaces == "false" %}
|
|
#cover butt
|
|
auto {{ iiab_wan_iface }}
|
|
iface {{ iiab_wan_iface }} inet dhcp
|
|
{% endif %}
|
|
# end dhcp clients
|
|
# static wan
|
|
{% if wan_ip != "dhcp" and dhcpcd_result != "enabled" and wan_in_interfaces == "false" %}
|
|
auto {{ iiab_wan_iface }}
|
|
iface {{ iiab_wan_iface }} inet static
|
|
address {{ wan_ip }}
|
|
netmask {{ wan_netmask }}
|
|
gateway {{ wan_gateway }}
|
|
dns-nameservers 127.0.0.1 {{ wan_nameserver }}
|
|
dns-search {{ iiab_domain }}
|
|
{% endif %} {# end of static_wan #}
|
|
|
|
{% endif %} {# end of iiab_network_mode != LanController #}
|