Add names to xlink routes and bridges. (#1239)

Fix aredn_message_all file-not-found error.
This commit is contained in:
Tim Wilkinson 2024-06-07 18:39:44 -07:00 committed by GitHub
parent f2d8adb8d3
commit 2f74728693
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 5 deletions

View File

@ -73,10 +73,12 @@ then
else else
# need to append to node file # need to append to node file
retrieve_alert http://downloads.arednmesh.org/messages/all.txt aredn_message_all "all nodes" retrieve_alert http://downloads.arednmesh.org/messages/all.txt aredn_message_all "all nodes"
if [ -s "/tmp/aredn_message_all" ]; then
echo "<br />" >> /tmp/aredn_message echo "<br />" >> /tmp/aredn_message
cat /tmp/aredn_message_all >> /tmp/aredn_message cat /tmp/aredn_message_all >> /tmp/aredn_message
rm /tmp/aredn_message_all rm /tmp/aredn_message_all
fi fi
fi
fi fi
# are local alerts enabled? uci: aredn.alerts.localpath != NULL # are local alerts enabled? uci: aredn.alerts.localpath != NULL

View File

@ -309,7 +309,7 @@ function write_xlink_config(configs)
f:write("# Generated by advancednetwork\n") f:write("# Generated by advancednetwork\n")
for _, config in ipairs(configs) for _, config in ipairs(configs)
do do
f:write("\nconfig bridge-vlan\n") f:write("\nconfig bridge-vlan '" .. config.name .. "bridge'\n")
f:write("\toption device 'br0'\n") f:write("\toption device 'br0'\n")
f:write("\toption vlan '" .. config.vlan .. "'\n") f:write("\toption vlan '" .. config.vlan .. "'\n")
f:write("\tlist ports '" .. config.port .. ":t'\n") f:write("\tlist ports '" .. config.port .. ":t'\n")
@ -332,7 +332,7 @@ function write_xlink_config(configs)
end end
if config.peer and config.peer ~= "" then if config.peer and config.peer ~= "" then
f:write("\toption peer '" .. config.peer .. "'\n") f:write("\toption peer '" .. config.peer .. "'\n")
f:write("\nconfig route\n") f:write("\nconfig route '" .. config.name .. "route'\n")
f:write("\toption interface '" .. config.name .. "'\n") f:write("\toption interface '" .. config.name .. "'\n")
f:write("\toption target '" .. config.peer .. "'\n") f:write("\toption target '" .. config.peer .. "'\n")
end end