From 998be2025bafb04a466ab7dda389b44a22ef92e5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 20:57:04 +0100 Subject: [PATCH] begin to create cdist-quickstart Signed-off-by: Nico Schottelius --- bin/cdist-quickstart | 33 +++++++++++++++++++++++++++++---- doc/man/cdist-manifest.text | 3 +-- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/bin/cdist-quickstart b/bin/cdist-quickstart index 08868582..9fc65641 100755 --- a/bin/cdist-quickstart +++ b/bin/cdist-quickstart @@ -24,17 +24,42 @@ . cdist-config set -eu +banner="cdist-quickstart>" +continue="Press enter to continue or ctrl-c to abort." + __prompt() { - echo "Press enter to continue or ctrl-c to abort" - echo "[Enter]" + echo -n "$banner" "$@" read answer } cat << eof +$banner cdist version $__cdist_version -Welcome to cdist-quickstart, the interactive guide to cdist! +Welcome to the interactive guide to cdist! +This is the interactive tutorial and beginners help for cdist. -After you press enter, I'll create the basic directories for you. eof +__prompt "$continue" + +cat << eof + +To make any use of cdist, we need to create the configuration base, which +can normally be found below ${__cdist_conf_dir}: + +${__cdist_explorer_dir}: Contains explorer, which explore the target +${__cdist_manifest_dir}: Contains manifests which define types being used +${__cdist_manifest_init}: The first manifest executed (i.e. cdist entry point) +${__cdist_type_dir}: Contains types + +eof +__prompt "$continue" + +set -x +mkdir ${__cdist_conf_dir} +mkdir ${__cdist_explorer_dir} +mkdir ${__cdist_manifest_dir} +touch ${__cdist_manifest_init} +mkdir ${__cdist_type_dir} +set +x diff --git a/doc/man/cdist-manifest.text b/doc/man/cdist-manifest.text index 39551cec..40ab2c4e 100644 --- a/doc/man/cdist-manifest.text +++ b/doc/man/cdist-manifest.text @@ -36,7 +36,6 @@ esac The manifest of the type "nologin" may look like this: - -------------------------------------------------------------------------------- __file /etc/nologin --type file --source "$__type/files/default.nologin" -------------------------------------------------------------------------------- @@ -46,7 +45,7 @@ SEE ALSO -------- cdist-manifest-run(1), cdist-manifest-run-all(1), -cdist-manifest-run-init(1) +cdist-manifest-run-init(1), cdist-type(7)