export __cdist_local_base_dir in cdist-deploy-to for others

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-26 10:42:06 +01:00
parent 3ab8f8d964
commit 1ed0b6d474
3 changed files with 7 additions and 2 deletions

View File

@ -30,6 +30,9 @@ __cdist_target_host="$1"
# Make target host available for non-core # Make target host available for non-core
export $__cdist_name_var_target_host="$__cdist_target_host" export $__cdist_name_var_target_host="$__cdist_target_host"
# Export variables for core, which others do not reset
export __cdist_local_base_dir
################################################################################ ################################################################################
# See cdist-stages(7) # See cdist-stages(7)
# #

View File

@ -41,6 +41,7 @@ if ! $(echo "$destination" | grep -q ^/); then
fi fi
# Copy source if existing # Copy source if existing
# FIXME: directory handling not supported - add recursive flag?
if [ -f "$__object/parameter/source" ]; then if [ -f "$__object/parameter/source" ]; then
source="$(cat "$__object/parameter/source")" source="$(cat "$__object/parameter/source")"
@ -59,7 +60,6 @@ if [ -f "$__object/parameter/source" ]; then
# Probably describe it in cdist-quickstart... # Probably describe it in cdist-quickstart...
scp "$source" "root@${__target_host}:${destination}" scp "$source" "root@${__target_host}:${destination}"
fi fi
# No source? Create empty file/dir # No source? Create empty file/dir
else else
case "$type" in case "$type" in

View File

@ -22,6 +22,8 @@
destination=/etc/issue destination=/etc/issue
os="$(cat "out/explorer/os")" os="$(cat "out/explorer/os")"
set -x
case "$os" in case "$os" in
archlinux) archlinux)
source="$__type/files/archlinux" source="$__type/files/archlinux"
@ -32,4 +34,4 @@ case "$os" in
esac esac
# FIXME: replace id with $destination post-1.0 # FIXME: replace id with $destination post-1.0
__file etc-issue --source "$source" --destination "$destination" --type file __file "$destination" --source "$source" --type file