forked from ungleich-public/cdist
add more functions to cdist-config
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
c0c01187be
commit
9116df2edd
1 changed files with 17 additions and 2 deletions
|
@ -27,11 +27,26 @@
|
|||
: ${CDIST_HOSTS:=$CDIST_CONFIG/hosts}
|
||||
: ${CDIST_MODULES:=$CDIST_CONFIG/modules}
|
||||
|
||||
cdist_debug_echo()
|
||||
################################################################################
|
||||
# cconf standard vars prefixed with cdist
|
||||
__cdist_pwd="$(pwd -P)"
|
||||
__cdist_mydir="${0%/*}";
|
||||
__cdist_abs_mydir="$(cd "$__mydir" && pwd -P)"
|
||||
__cdist_myname=${0##*/};
|
||||
__cdist_abs_myname="$__abs_mydir/$__myname"
|
||||
|
||||
|
||||
__cdist_debug_echo()
|
||||
{
|
||||
[ "$CDIST_DEBUG" ] && echo "Debug: $@"
|
||||
}
|
||||
|
||||
__cdist_usage()
|
||||
{
|
||||
echo "$__cdist_myname: $@"
|
||||
exit 1
|
||||
}
|
||||
|
||||
: ${CDIST_TMP:=$(mktemp /tmp/cdist.XXXXXXXXXXXX)}
|
||||
|
||||
#set -e
|
||||
|
@ -39,7 +54,7 @@ cdist_debug_echo()
|
|||
# load libraries so every program has them available
|
||||
find "${CDIST_LIBDIR}" -type f > "${CDIST_TMP}"
|
||||
while read __cdist_lib; do
|
||||
cdist_debug_echo "Loading $__cdist_lib ..."
|
||||
__cdist_debug_echo "Loading $__cdist_lib ..."
|
||||
. "${__cdist_lib}"
|
||||
done < "${CDIST_TMP}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue