__config_file: Fix onchange command not being executed ()

When a config file state changes from present to absent, onchange
command was not being run.

Fixes .
This commit is contained in:
lubo 2017-11-10 12:22:38 +01:00 committed by Darko Poljak
parent 4fc72908d8
commit aec63d42f1

View file

@ -19,16 +19,9 @@
#
destination="$__object_id"
state="$(cat "$__object/parameter/state")"
if [ "$state" = "absent" ]; then
# nothing to do
exit 0
fi
if [ -f "$__object/parameter/onchange" ]; then
if grep -q "^__file/${destination}" "$__messages_in"; then
cat "$__object/parameter/onchange"
fi
fi