From 243106f513950f3fdc660d50c358c5cd6c0edd41 Mon Sep 17 00:00:00 2001 From: Tomas Pospisek Date: Sun, 7 Jul 2013 13:11:09 +0200 Subject: [PATCH 1/3] improve docu wording --- docs/man/man7/cdist-type.text | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/man/man7/cdist-type.text b/docs/man/man7/cdist-type.text index 18deda9a..71495797 100644 --- a/docs/man/man7/cdist-type.text +++ b/docs/man/man7/cdist-type.text @@ -67,18 +67,18 @@ A type consists of Types are stored below cdist/conf/type/. Their name should always be prefixed with two underscores (__) to prevent collisions with other executables in $PATH. -To begin a new type, just create the directory **cdist/conf/type/__NAME**. +To implement a new type, create the directory **cdist/conf/type/__NAME**. DEFINING PARAMETERS ------------------- Every type consists of required, optional and boolean parameters, which must -be created in a newline separated file in ***parameter/required***, +each be declared in a newline separated file in ***parameter/required***, ***parameter/required_multiple***, ***parameter/optional***, ***parameter/optional_multiple*** and ***parameter/boolean***. Parameters which are allowed multiple times should be listed in -required_multiple or optional_multiple respectively. For all other parameters -the standard unix behaviour of the last given wins is applied. +required_multiple or optional_multiple respectively. All other parameters +follow the standard unix behaviour "the last given wins". If either is missing, the type will have no required, no optional, no boolean or no parameters at all. @@ -125,7 +125,7 @@ fi INPUT FROM STDIN ------------------ +---------------- Every type can access what has been written on stdin when it has been called. The result is saved into the ***stdin*** file in the object directory. From 0162436ab700417d2b3a47ffddf41cfa95eb8663 Mon Sep 17 00:00:00 2001 From: Tomas Pospisek Date: Sun, 7 Jul 2013 13:11:20 +0200 Subject: [PATCH 2/3] fix asciidoc misinterpretation asciidoc was misinterpreting the '-----' (see patch) as underlining the previous text instead of as starting the next source code section. Inserting a newline in between to help asciidoc. --- docs/man/man7/cdist-type.text | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/man/man7/cdist-type.text b/docs/man/man7/cdist-type.text index 71495797..7d941281 100644 --- a/docs/man/man7/cdist-type.text +++ b/docs/man/man7/cdist-type.text @@ -141,6 +141,7 @@ If you have not seen this syntax (<< eof) before, it may help you to read about "here documents". In the __file type, stdin is used as source for the file, if - is used for source: + -------------------------------------------------------------------------------- if [ -f "$__object/parameter/source" ]; then source="$(cat "$__object/parameter/source")" From 995a02360b2ef85bd3bc43fb421774ab8d51ace7 Mon Sep 17 00:00:00 2001 From: Tomas Pospisek Date: Sun, 7 Jul 2013 13:18:32 +0200 Subject: [PATCH 3/3] improve docu wording --- docs/man/man7/cdist-type.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/man/man7/cdist-type.text b/docs/man/man7/cdist-type.text index 7d941281..cfb50414 100644 --- a/docs/man/man7/cdist-type.text +++ b/docs/man/man7/cdist-type.text @@ -230,7 +230,7 @@ the output of gencode-remote is executed on the target. The gencode scripts can make use of the parameters, the global explorers and the type specific explorers. -If the gencode scripts encounter an error, it should print diagnostic +If the gencode scripts encounters an error, it should print diagnostic messages to stderr and exit non-zero. If you need to debug the gencode script, you can write to stderr: