2 # This is only run once (usually after flashing an image from the imagebuilder)
3 # It sets up the initial config for this node.
13 # Rename system config
15 if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then
16 section_rename system
$1 system
19 config_foreach handle_system system
21 if [ -n "$(uci -q get meshwizard.system)" ]; then
22 echo " + Setup system"
23 uci show meshwizard.system |
sed 's/^meshwizard/uci set system/g' |
while read line
; do
27 uci
-q delete meshwizard.system
30 if [ -n "$(uci -q get meshwizard.community)" ]; then
31 echo " + Setup community"
32 uci show meshwizard.community |
sed 's/^meshwizard/freifunk/g' |
while read line
; do
36 uci
-q delete meshwizard.community
39 if [ -n "$(uci -q get meshwizard.contact)" ]; then
40 echo " + Setup contact"
41 uci show meshwizard.contact |
sed 's/^meshwizard/freifunk/g' |
while read line
; do
45 uci
-q delete meshwizard.contact
48 if [ -n "$(uci -q get meshwizard.luci_main)" ]; then
50 uci show meshwizard.luci_main |
sed -e 's/^meshwizard/luci/g' -e 's/luci_main/main/' |
while read line
; do
54 uci
-q delete meshwizard.luci_main