[type/__uci] Send messages when options are set to be altered
This commit is contained in:
parent
d8f20a6a20
commit
d3574b2d3e
1 changed files with 5 additions and 0 deletions
|
@ -53,6 +53,8 @@ in
|
|||
if test "$(wc -l "${__object:?}/parameter/value")" -gt 1
|
||||
then
|
||||
# "should" is a list
|
||||
printf 'set_list %s\n' "${config}" >>"${__messages_out:?}"
|
||||
|
||||
if test "${state_is}" != 'absent'
|
||||
then
|
||||
printf "uci delete '%s'\n" "${config}"
|
||||
|
@ -64,6 +66,8 @@ in
|
|||
done <"${__object:?}/parameter/value"
|
||||
else
|
||||
# "should" is a scalar
|
||||
printf 'set %s\n' "${config}" >>"${__messages_out:?}"
|
||||
|
||||
value=$(cat "${__object:?}/parameter/value")
|
||||
uci_cmd "set '%s'='%s'" "${config}" "${value}"
|
||||
fi
|
||||
|
@ -74,6 +78,7 @@ in
|
|||
exit 0
|
||||
fi
|
||||
|
||||
printf 'delete %s\n' "${config}" >>"${__messages_out:?}"
|
||||
uci_cmd "delete '%s'" "${config}"
|
||||
;;
|
||||
(*)
|
||||
|
|
Loading…
Reference in a new issue