diff --git a/test/cdist-cconfig-tree b/test/cdist-cconfig-tree index dfe954ba..74315a3d 100755 --- a/test/cdist-cconfig-tree +++ b/test/cdist-cconfig-tree @@ -31,7 +31,7 @@ set -au export cdist_types="file service user" # the file that contains mapping from hosts to types -# we will execute this later +# we will execute this later -- call this MANIFEST? cdist_config_base="./cdist_config_base" cdist_tree_wrapper="./cdist_tree_wrapper" @@ -56,6 +56,8 @@ rm -rf "${tmpdir}" # contains cdist-tree binaries mkdir -p "${cdist_bindir}" #ln -s "${cdist_tree_wrapper_abs}" "${bindir}" + +# Create our binaries, will are called from the manifest - temporary ( set -e cd "${cdist_bindir}" diff --git a/test/cdist_tree_wrapper b/test/cdist_tree_wrapper index a088844e..5abe6f7a 100755 --- a/test/cdist_tree_wrapper +++ b/test/cdist_tree_wrapper @@ -20,6 +20,9 @@ # # Wrapper script that generates cconfig from arguments # +# This script will be called everytime the manifest decides to create +# a new type +# . cdist-config @@ -40,6 +43,7 @@ ddir="${cdist_confdir}/${tid}" if [ -e "${ddir}" ]; then # FIXME: add source! $cdist_config_base/source + # FIXME: force $source information to be present from outside! __cdist_usage "${tid} already exists" fi @@ -52,6 +56,9 @@ while [ $# -gt 0 ]; do opt_file="$(echo $opt | sed 's/^--//')" + # FIXME: check for options supported by type - or leave it to the type? + # I guess do it here, so we also check whether + [ $# -ge 1 ] || __cdist_usage "Missing value for $opt" value="$1"; shift