forked from ungleich-public/cdist
Merge branch 'master' of https://github.com/tpo/cdist
This commit is contained in:
commit
140a6bea23
1 changed files with 7 additions and 6 deletions
|
@ -67,18 +67,18 @@ A type consists of
|
||||||
Types are stored below cdist/conf/type/. Their name should always be prefixed with
|
Types are stored below cdist/conf/type/. Their name should always be prefixed with
|
||||||
two underscores (__) to prevent collisions with other executables in $PATH.
|
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
|
DEFINING PARAMETERS
|
||||||
-------------------
|
-------------------
|
||||||
Every type consists of required, optional and boolean parameters, which must
|
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/required_multiple***, ***parameter/optional***,
|
||||||
***parameter/optional_multiple*** and ***parameter/boolean***.
|
***parameter/optional_multiple*** and ***parameter/boolean***.
|
||||||
Parameters which are allowed multiple times should be listed in
|
Parameters which are allowed multiple times should be listed in
|
||||||
required_multiple or optional_multiple respectively. For all other parameters
|
required_multiple or optional_multiple respectively. All other parameters
|
||||||
the standard unix behaviour of the last given wins is applied.
|
follow the standard unix behaviour "the last given wins".
|
||||||
If either is missing, the type will have no required, no optional, no boolean
|
If either is missing, the type will have no required, no optional, no boolean
|
||||||
or no parameters at all.
|
or no parameters at all.
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
INPUT FROM STDIN
|
INPUT FROM STDIN
|
||||||
-----------------
|
----------------
|
||||||
Every type can access what has been written on stdin when it has been called.
|
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.
|
The result is saved into the ***stdin*** file in the object directory.
|
||||||
|
|
||||||
|
@ -141,6 +141,7 @@ If you have not seen this syntax (<< eof) before, it may help you to read
|
||||||
about "here documents".
|
about "here documents".
|
||||||
|
|
||||||
In the __file type, stdin is used as source for the file, if - is used for source:
|
In the __file type, stdin is used as source for the file, if - is used for source:
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
if [ -f "$__object/parameter/source" ]; then
|
if [ -f "$__object/parameter/source" ]; then
|
||||||
source="$(cat "$__object/parameter/source")"
|
source="$(cat "$__object/parameter/source")"
|
||||||
|
@ -229,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
|
The gencode scripts can make use of the parameters, the global explorers
|
||||||
and the type specific 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
|
messages to stderr and exit non-zero. If you need to debug the gencode
|
||||||
script, you can write to stderr:
|
script, you can write to stderr:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue