Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • firmware/gluon
  • 0x4A6F/gluon
  • patrick/gluon
3 results
Select Git revision
Loading items
Show changes
Showing
with 96 additions and 22 deletions
...@@ -26,12 +26,15 @@ need_string(in_site({'timezone'})) ...@@ -26,12 +26,15 @@ need_string(in_site({'timezone'}))
need_string_array({'ntp_servers'}, false) need_string_array({'ntp_servers'}, false)
need_string_match(in_domain({'prefix4'}), '^%d+.%d+.%d+.%d+/%d+$', false)
need_string_match(in_domain({'prefix6'}), '^[%x:]+/64$') need_string_match(in_domain({'prefix6'}), '^[%x:]+/64$')
need_string_array_match(in_domain({'extra_prefixes6'}), '^[%x:]+/%d+$', false)
local supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000} local supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000}
for _, config in ipairs({'wifi24', 'wifi5'}) do for _, config in ipairs({'wifi24', 'wifi5'}) do
if need_table({config}, nil, false) then if need_table({config}, nil, false) then
need_string(in_site({'regdom'})) -- regdom is only required when wifi24 or wifi5 is configured need_string(in_site({'regdom'})) -- regdom is only required when wifi24 or wifi5 is configured
need_number({config, 'beacon_interval'}, false)
if config == "wifi24" then if config == "wifi24" then
local channels = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14} local channels = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}
...@@ -49,14 +52,7 @@ for _, config in ipairs({'wifi24', 'wifi5'}) do ...@@ -49,14 +52,7 @@ for _, config in ipairs({'wifi24', 'wifi5'}) do
obsolete({config, 'supported_rates'}, '802.11b rates are disabled by default.') obsolete({config, 'supported_rates'}, '802.11b rates are disabled by default.')
obsolete({config, 'basic_rate'}, '802.11b rates are disabled by default.') obsolete({config, 'basic_rate'}, '802.11b rates are disabled by default.')
obsolete({config, 'ibss'}, 'IBSS support has been dropped.')
if need_table({config, 'ibss'}, nil, false) then
need_string_match(in_domain({config, 'ibss', 'ssid'}), '^' .. ('.?'):rep(32) .. '$')
need_string_match(in_domain({config, 'ibss', 'bssid'}), '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$')
need_one_of({config, 'ibss', 'mcast_rate'}, supported_rates, false)
need_number({config, 'ibss', 'vlan'}, false)
need_boolean({config, 'ibss', 'disabled'}, false)
end
if need_table({config, 'mesh'}, nil, false) then if need_table({config, 'mesh'}, nil, false) then
need_string_match(in_domain({config, 'mesh', 'id'}), '^' .. ('.?'):rep(32) .. '$') need_string_match(in_domain({config, 'mesh', 'id'}), '^' .. ('.?'):rep(32) .. '$')
...@@ -70,6 +66,7 @@ need_boolean(in_site({'poe_passthrough'}), false) ...@@ -70,6 +66,7 @@ need_boolean(in_site({'poe_passthrough'}), false)
if need_table({'dns'}, nil, false) then if need_table({'dns'}, nil, false) then
need_string_array_match({'dns', 'servers'}, '^[%x:]+$') need_string_array_match({'dns', 'servers'}, '^[%x:]+$')
need_number({'dns', 'cacheentries'}, false)
end end
need_string_array(in_domain({'next_node', 'name'}), false) need_string_array(in_domain({'next_node', 'name'}), false)
...@@ -78,6 +75,15 @@ need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false) ...@@ -78,6 +75,15 @@ need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false)
need_boolean(in_domain({'mesh', 'vxlan'}), false) need_boolean(in_domain({'mesh', 'vxlan'}), false)
need_boolean(in_site({'mesh_on_wan'}), false) local interfaces_roles = {'client', 'uplink', 'mesh'}
need_boolean(in_site({'mesh_on_lan'}), false) for _, config in ipairs({'wan', 'lan', 'single'}) do
need_boolean(in_site({'single_as_lan'}), false) local default_roles = in_site({'interfaces', config, 'default_roles'})
need_array_of(default_roles, interfaces_roles, false)
need_array_elements_exclusive(default_roles, 'client', 'mesh', false)
need_array_elements_exclusive(default_roles, 'client', 'uplink', false)
end
obsolete({'mesh_on_wan'}, 'Use interfaces.wan.default_roles.')
obsolete({'mesh_on_lan'}, 'Use interfaces.lan.default_roles.')
obsolete({'single_as_lan'}, 'Use interfaces.single.default_roles.')
config wireless
#!/bin/sh
[ -e "/lib/firmware/$FIRMWARE" ] && exit 0
case "$FIRMWARE" in
ath10k/fwcfg*)
cp "/lib/gluon/ath10k-fwcfg.txt" "/lib/firmware/$FIRMWARE"
;;
esac
#!/bin/sh /etc/rc.common
# Start right after S10boot
START=10
start() {
config_load gluon
config_get_bool reconfigure core reconfigure 0
# shellcheck disable=SC2154
if [ "$reconfigure" = 1 ]; then
gluon-reconfigure
fi
}
#!/bin/sh #!/bin/sh
# Work around an issue with wifi setup timing by waiting a bit
# while device initialisation is ongoing.
# https://github.com/freifunk-gluon/gluon/issues/2779
sleep 3
gluon-reconfigure gluon-reconfigure
exit 0 exit 0
vdevs = 4
peers = 96
active_peers = 96
stations = 96
#!/bin/sh
# shellcheck disable=SC1091
. /lib/functions/system.sh
get_mac_label
#!/bin/sh
/etc/init.d/sysntpd stop
#!/bin/sh
/etc/init.d/network stop
#!/bin/sh
/etc/init.d/dnsmasq stop
#!/bin/sh
/etc/init.d/firewall stop
#!/bin/sh
/etc/init.d/network restart
#!/bin/sh
/etc/init.d/gluon-core-reconfigure start
#!/bin/sh
/etc/init.d/dnsmasq start
#!/bin/sh
/etc/init.d/firewall start
#!/bin/sh
/etc/init.d/network start
#!/bin/sh
/etc/init.d/sysntpd start
#!/bin/sh
NETWORK_CFG='/etc/config/network'
NETWORK_SAVED="${NETWORK_CFG}_gluon-old"
SYSTEM_CFG='/etc/config/system'
SYSTEM_SAVED="${SYSTEM_CFG}_gluon-old"
# Make sure everything is saved before we move away the config files
uci commit
# Save old configs (unless there is already a saved config,
# which means that the previous upgrade was interrupted)
if [ -s "$NETWORK_CFG" ] && ! [ -s "$NETWORK_SAVED" ]; then
mv -f "$NETWORK_CFG" "$NETWORK_SAVED"
fi
if [ -s "$SYSTEM_CFG" ] && ! [ -s "$SYSTEM_SAVED" ]; then
mv -f "$SYSTEM_CFG" "$SYSTEM_SAVED"
fi
# Generate a new network config
rm -f /etc/board.json "$NETWORK_CFG" "$SYSTEM_CFG"
config_generate
#!/bin/sh
# This script can be removed after Gluon v2018.2
# Check for a random line that always was in /etc/sysctl.conf
if grep -qxF 'net.ipv4.ip_forward=1' /etc/sysctl.conf; then
echo '# Defaults are configured in /etc/sysctl.d/* and can be customized in this file' >/etc/sysctl.conf
fi