diff --git a/files/usr/local/bin/aredn_message.sh b/files/usr/local/bin/aredn_message.sh index 42359392..9c043b52 100755 --- a/files/usr/local/bin/aredn_message.sh +++ b/files/usr/local/bin/aredn_message.sh @@ -73,9 +73,11 @@ then else # need to append to node file retrieve_alert http://downloads.arednmesh.org/messages/all.txt aredn_message_all "all nodes" - echo "
" >> /tmp/aredn_message - cat /tmp/aredn_message_all >> /tmp/aredn_message - rm /tmp/aredn_message_all + if [ -s "/tmp/aredn_message_all" ]; then + echo "
" >> /tmp/aredn_message + cat /tmp/aredn_message_all >> /tmp/aredn_message + rm /tmp/aredn_message_all + fi fi fi diff --git a/files/www/cgi-bin/advancednetwork b/files/www/cgi-bin/advancednetwork index eaaf35e3..15e7848f 100755 --- a/files/www/cgi-bin/advancednetwork +++ b/files/www/cgi-bin/advancednetwork @@ -309,7 +309,7 @@ function write_xlink_config(configs) f:write("# Generated by advancednetwork\n") for _, config in ipairs(configs) 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 vlan '" .. config.vlan .. "'\n") f:write("\tlist ports '" .. config.port .. ":t'\n") @@ -332,7 +332,7 @@ function write_xlink_config(configs) end if config.peer and config.peer ~= "" then 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 target '" .. config.peer .. "'\n") end