X-Git-Url: http://git.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=contrib%2Fpackage%2Fmeshwizard%2Ffiles%2Fusr%2Fbin%2Fmeshwizard%2Fhelpers%2Finitial_config.sh;fp=contrib%2Fpackage%2Fmeshwizard%2Ffiles%2Fusr%2Fbin%2Fmeshwizard%2Fhelpers%2Finitial_config.sh;h=0000000000000000000000000000000000000000;hp=c1e55224eba7909a6e3bc181f2de2f0ba7707c72;hb=4654ba92c3999d84b08211f05d2ccb5ea9da731b;hpb=eda8f02dac3caa4d0f52cd1e860d7a392c295df3 diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/initial_config.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/initial_config.sh deleted file mode 100755 index c1e55224eb..0000000000 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/initial_config.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -# This is only run once (usually after flashing an image from the imagebuilder) -# It sets up the initial config for this node. - -. /lib/functions.sh -. $dir/functions.sh - -config_load system - -# Rename system config -handle_system() { - if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then - section_rename system $1 system - fi -} -config_foreach handle_system system - -if [ -n "$(uci -q get meshwizard.community)" ]; then - set_defaults "community_" freifunk.community - uci -q delete meshwizard.community -fi - -[ -n "$profile_homepage" ] && uci set freifunk.community.homepage="$profile_homepage" - -[ -n "$profile_mapserver" ] && { - uci -q delete freifunk.community.mapserver - for m in $profile_mapserver; do - uci add_list freifunk.community.mapserver="$m" - done -} - -uci_commitverbose "Setup community" freifunk - -if [ -n "$(uci -q get meshwizard.contact)" ]; then - set_defaults "contact_" freifunk.contact - uci -q delete meshwizard.contact && uci_commitverbose "Setup contact" freifunk -fi - -if [ "$has_luci" == TRUE ]; then - set_defaults "luci_main_" luci.main - uci -q delete meshwizard.luci_main && uci_commitverbose "Setup luci" luci -fi