X-Git-Url: http://git.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=contrib%2Fpackage%2Fmeshwizard%2Ffiles%2Fusr%2Fbin%2Fmeshwizard%2Ffunctions.sh;h=689289bbb8e7321d06f2ab57a03af653d140e9ce;hp=5e0e1941854053e11a491c15647baa1be5c60cbc;hb=63639d6076048d87caab5bccdf943de9276e2ec8;hpb=bc8eaf6875fb195484b0a86e71ea92dc63b82ded diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh index 5e0e194185..689289bbb8 100644 --- a/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh +++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/functions.sh @@ -12,11 +12,21 @@ uci_remove_list_element() { done } +# Takes 2 arguments +# $1 = text to be displayed in the output for this section +# $2 = section (optional) +uci_commitverbose() { + echo "+ $1" + uci changes $2 | while read line; do + echo " $line" + done + uci commit $2 +} + set_defaults() { for def in $(env |grep "^$1"); do option=${def/$1/} uci set $2.$option - echo " ${option/=/: }" done } @@ -30,10 +40,6 @@ section_rename() { uci -q rename $1.$2=$3 && msg_rename $1.$2 $1.$3 || msg_rename_error $1.2 $1.$3 } -msg_start() { - echo " Starting configuration of $1" -} - msg_cleanup() { echo " Cleanup: Removed section $1." }