2 # This is only run once (usually after flashing an image from the imagebuilder)
3 # It sets up the initial config for this node.
10 # Rename system config
12 if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
13 section_rename system $1 system
16 config_foreach handle_system system
18 if [ -n "$(uci -q get meshwizard.community)" ]; then
19 set_defaults "community_" freifunk.community
20 uci -q delete meshwizard.community
23 [ -n "$profile_homepage" ] && uci set freifunk.community.homepage="$profile_homepage"
25 [ -n "$profile_mapserver" ] && {
26 uci -q delete freifunk.community.mapserver
27 for m in $profile_mapserver; do
28 uci add_list freifunk.community.mapserver="$m"
32 uci_commitverbose "Setup community" freifunk
34 if [ -n "$(uci -q get meshwizard.contact)" ]; then
35 set_defaults "contact_" freifunk.contact
36 uci -q delete meshwizard.contact && uci_commitverbose "Setup contact" freifunk
39 if [ "$has_luci" == TRUE ]; then
40 set_defaults "luci_main_" luci.main
41 uci -q delete meshwizard.luci_main && uci_commitverbose "Setup luci" luci