diff options
author | Manuel Munz <freifunk@somakoma.de> | 2012-08-02 18:32:41 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2012-08-02 18:32:41 +0000 |
commit | 0c4edd49b982007fff60f64a86d73aabf7f68784 (patch) | |
tree | fc3338331ae2e6c78e8989f7990ce2579483d4e2 /contrib/package/meshwizard/files | |
parent | 6574b8147c8067c6f2df124557f58bd10b18aaae (diff) |
meshwizard: Fix olsrd plugin setup/renaming
Diffstat (limited to 'contrib/package/meshwizard/files')
-rw-r--r-- | contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh | 2 | ||||
-rwxr-xr-x | contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh index f8271498ad..c9f7ee7fd1 100644 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh @@ -35,7 +35,7 @@ set_defaults() { # 3 arguements: 1=config name 2=oldname 3=newname section_rename() { - uci -q rename $1.$2=$3 && msg_rename $1.$2 $1.$3 || msg_rename_error $1.2 $1.$3 + uci -q rename $1.$2=$3 && msg_rename $1.$2 $1.$3 || msg_rename_error $1.$2 $1.$3 } msg_missing_value() { diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh index 306cf94200..2d9e74c7bd 100755 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_olsrd.sh @@ -4,8 +4,7 @@ . /lib/functions.sh . $dir/functions.sh -# Clean the config, remove httpinfo and interface wlan -uci -q delete olsrd.olsrd_httpinfo +# Clean the config, remove interface wlan handle_interface() { config_get interface "$1" interface if [ "$interface" = "wlan" ]; then @@ -14,7 +13,6 @@ handle_interface() { } config_load olsrd config_foreach handle_interface Interface -uci_commitverbose "Cleanup olsrd config" olsrd #Rename olsrd basic settings handle_olsrd() { @@ -36,13 +34,11 @@ config_foreach handle_interfacedefaults InterfaceDefaults if [ "$profile_ipv6" = 1 ] && [ "$has_ipv6" == "1" ]; then uci set olsrd.olsrd.IpVersion="6and4" fi -uci_commitverbose "Setup olsr basic settings" olsrd # Setup new InterfaceDefaults uci set olsrd.InterfaceDefaults=InterfaceDefaults set_defaults "olsr_interfacedefaults_" olsrd.InterfaceDefaults -uci_commitverbose "Setup olsr interface defaults" olsrd # Rename nameservice, dyngw and httpinfo plugins @@ -50,10 +46,15 @@ handle_plugin() { config_get library "$1" library if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then new="$(echo $library | cut -d '.' -f 1)" - section_rename olsrd $1 $new + section_rename olsrd "$1" "$new" fi } config_foreach handle_plugin LoadPlugin +uci -q delete olsrd.olsrd_httpinfo +uci -q delete olsrd.olsrd_dyn_gw + +uci_commitverbose "Cleanup olsrd config" olsrd + # Setup nameservice plugin if [ -n "$profile_suffix" ]; then |