From f6b318bb00e63c2fe5d4fae26c66d0fd48470db8 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Tue, 9 Apr 2019 22:23:21 +0200 Subject: [PATCH] Fire onchange for present and exists states Even if no attribute is changed. Fixes #750. --- cdist/conf/type/__file/gencode-remote | 4 ++++ docs/changelog | 1 + 2 files changed, 5 insertions(+) diff --git a/cdist/conf/type/__file/gencode-remote b/cdist/conf/type/__file/gencode-remote index a6f35c0b..b04c471e 100755 --- a/cdist/conf/type/__file/gencode-remote +++ b/cdist/conf/type/__file/gencode-remote @@ -79,6 +79,10 @@ case "$state_should" in fi fi done + if [ -f "$__object/files/set-attributes" ]; then + # set-attributes is created if file is created or uploaded in gencode-local + fire_onchange=1 + fi ;; diff --git a/docs/changelog b/docs/changelog index b3f87c1f..7f0b4131 100644 --- a/docs/changelog +++ b/docs/changelog @@ -4,6 +4,7 @@ Changelog next: * Type __ssh_authorized_keys: Properly handle multiple --option params (Steven Armstrong) * Debugging: Add debug dump helper script (Darko Poljak) + * Type __file: Bugfix: fire onchange for present and exists states if no attribute is changed (Darko Poljak) 4.10.8: 2019-04-06 * Type __clean_path: Fix list explorer exit code if path not directory or does not exist (Ander Punnar)