|
|
|
@ -73,9 +73,19 @@ create_bat0() {
|
|
|
|
|
echo "Old bat0 interface deleted from lan network."
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Add 'bat0' to the list of ports for 'br-lan'
|
|
|
|
|
uci add_list network.@device[0].ports='bat0'
|
|
|
|
|
echo "bat0 has been added to the lan network."
|
|
|
|
|
# # Add 'bat0' to the list of ports for 'br-lan'
|
|
|
|
|
# uci add_list network.@device[0].ports='bat0'
|
|
|
|
|
# echo "bat0 has been added to the lan network."
|
|
|
|
|
|
|
|
|
|
# Get the LAN bridge name
|
|
|
|
|
LAN_NAME=$(uci -q get network.@device[0].name)
|
|
|
|
|
|
|
|
|
|
# Setup our Private Router Batman Interface
|
|
|
|
|
uci set network.private_router_batman=interface
|
|
|
|
|
uci set network.private_router_batman.proto='batadv_hardif'
|
|
|
|
|
uci set network.private_router_batman.master='bat0'
|
|
|
|
|
uci set network.private_router_batman.device="$LAN_NAME"
|
|
|
|
|
uci set network.private_router_batman.mtu='1536'
|
|
|
|
|
|
|
|
|
|
uci commit network
|
|
|
|
|
fi
|
|
|
|
@ -126,18 +136,18 @@ setup_mesh_radio() {
|
|
|
|
|
# Commit changes to wireless
|
|
|
|
|
uci commit wireless
|
|
|
|
|
|
|
|
|
|
uci set network.nwi_mesh_$CURRENT_RADIO=interface
|
|
|
|
|
uci set network.nwi_mesh_$CURRENT_RADIO.proto='batadv_hardif'
|
|
|
|
|
uci set network.nwi_mesh_$CURRENT_RADIO.master='bat0'
|
|
|
|
|
uci set network.nwi_mesh_$CURRENT_RADIO.device='bat0'
|
|
|
|
|
uci set network.nwi_mesh_$CURRENT_RADIO.mtu='1536'
|
|
|
|
|
# uci set network.nwi_mesh_$CURRENT_RADIO=interface
|
|
|
|
|
# uci set network.nwi_mesh_$CURRENT_RADIO.proto='batadv_hardif'
|
|
|
|
|
# uci set network.nwi_mesh_$CURRENT_RADIO.master='bat0'
|
|
|
|
|
# uci set network.nwi_mesh_$CURRENT_RADIO.device='bat0'
|
|
|
|
|
# uci set network.nwi_mesh_$CURRENT_RADIO.mtu='1536'
|
|
|
|
|
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO=wifi-iface
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.device=$CURRENT_RADIO
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.ifname=mesh_$CURRENT_RADIO
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.network=nwi_mesh_$CURRENT_RADIO
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO='wifi-iface'
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.device="$CURRENT_RADIO"
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.ifname="mesh_$CURRENT_RADIO"
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.network='private_router_batman'
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.mode='mesh'
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.mesh_id=$MESH_NAME
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.mesh_id="$MESH_NAME"
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.mesh_fwding='0'
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.mesh_rssi_threshold='0'
|
|
|
|
|
uci set wireless.mesh_$CURRENT_RADIO.mesh_ttl='1'
|
|
|
|
@ -288,8 +298,8 @@ disable_easymesh() {
|
|
|
|
|
# Loop through all the radios and delete the network interfaces
|
|
|
|
|
for CURRENT_RADIO in $WIFI_RADIOS; do
|
|
|
|
|
echo "Handling removal of mesh networks for: $CURRENT_RADIO"
|
|
|
|
|
if [ "$(uci -q get network.nwi_mesh_$CURRENT_RADIO)" = "interface" ]; then
|
|
|
|
|
uci del network.nwi_mesh_$CURRENT_RADIO
|
|
|
|
|
if [ "$(uci -q get network.private_router_batman)" = "interface" ]; then
|
|
|
|
|
uci del network.private_router_batman
|
|
|
|
|
uci commit network
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|