From 0f6fe4764be5d138e1448c50dd19db743f838ab4 Mon Sep 17 00:00:00 2001 From: Ander Punnar Date: Thu, 28 Mar 2019 23:31:38 +0200 Subject: [PATCH] add --onchange to __line --- cdist/conf/type/__line/gencode-remote | 4 ++++ cdist/conf/type/__line/man.rst | 2 ++ cdist/conf/type/__line/parameter/optional | 1 + 3 files changed, 7 insertions(+) diff --git a/cdist/conf/type/__line/gencode-remote b/cdist/conf/type/__line/gencode-remote index 044ebe90..03e90c1b 100755 --- a/cdist/conf/type/__line/gencode-remote +++ b/cdist/conf/type/__line/gencode-remote @@ -122,3 +122,7 @@ END { ' "$file" > "\$tmpfile" mv -f "\$tmpfile" "$file" DONE + +if [ -f "$__object/parameter/onchange" ]; then + cat "$__object/parameter/onchange" +fi diff --git a/cdist/conf/type/__line/man.rst b/cdist/conf/type/__line/man.rst index d651985e..f76cab64 100644 --- a/cdist/conf/type/__line/man.rst +++ b/cdist/conf/type/__line/man.rst @@ -46,6 +46,8 @@ regex state 'present' or 'absent', defaults to 'present' +onchange + The code to run if line is added, removed or updated. BOOLEAN PARAMETERS diff --git a/cdist/conf/type/__line/parameter/optional b/cdist/conf/type/__line/parameter/optional index f89a2115..1c34c699 100644 --- a/cdist/conf/type/__line/parameter/optional +++ b/cdist/conf/type/__line/parameter/optional @@ -4,3 +4,4 @@ file line regex state +onchange