5e0e1941854053e11a491c15647baa1be5c60cbc
1 uci_remove_list_element
() {
4 local list
="$(uci get $option)"
9 if [ "$elem" != "$value" ]; then
10 uci add_list
$option=$elem
16 for def
in $
(env |
grep "^$1"); do
19 echo " ${option/=/: }"
23 # 1 argument: section to remove
25 uci
-q delete
$1 && msg_cleanup
$1 || msg_cleanup_error
$1
28 # 3 arguements: 1=config name 2=oldname 3=newname
30 uci
-q rename
$1.
$2=$3 && msg_rename
$1.
$2 $1.
$3 || msg_rename_error
$1.2
$1.
$3
34 echo " Starting configuration of $1"
38 echo " Cleanup: Removed section $1."
42 echo -e " \033[1mWarning:\033[0m Cleanup of $1 failed."
46 echo -e " \033[1mWarning:\033[0m Configuration option for $2 is missing in $1."
54 echo " \033[1mError: \033[0mThere was a problem."
58 echo " Renamed unnamed section $1 to $2."
62 echo " \033[1mWarning:\033[0m Could not rename $1 to $2."