forked from ungleich-public/cdist
[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
|
if test "$(wc -l "${__object:?}/parameter/value")" -gt 1
|
||||||
then
|
then
|
||||||
# "should" is a list
|
# "should" is a list
|
||||||
|
printf 'set_list %s\n' "${config}" >>"${__messages_out:?}"
|
||||||
|
|
||||||
if test "${state_is}" != 'absent'
|
if test "${state_is}" != 'absent'
|
||||||
then
|
then
|
||||||
printf "uci delete '%s'\n" "${config}"
|
printf "uci delete '%s'\n" "${config}"
|
||||||
|
@ -64,6 +66,8 @@ in
|
||||||
done <"${__object:?}/parameter/value"
|
done <"${__object:?}/parameter/value"
|
||||||
else
|
else
|
||||||
# "should" is a scalar
|
# "should" is a scalar
|
||||||
|
printf 'set %s\n' "${config}" >>"${__messages_out:?}"
|
||||||
|
|
||||||
value=$(cat "${__object:?}/parameter/value")
|
value=$(cat "${__object:?}/parameter/value")
|
||||||
uci_cmd "set '%s'='%s'" "${config}" "${value}"
|
uci_cmd "set '%s'='%s'" "${config}" "${value}"
|
||||||
fi
|
fi
|
||||||
|
@ -74,6 +78,7 @@ in
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf 'delete %s\n' "${config}" >>"${__messages_out:?}"
|
||||||
uci_cmd "delete '%s'" "${config}"
|
uci_cmd "delete '%s'" "${config}"
|
||||||
;;
|
;;
|
||||||
(*)
|
(*)
|
||||||
|
|
Loading…
Reference in a new issue