Use ../conf as default conf and change remote bin directory (next to conf/)

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-03-03 15:27:51 +01:00
parent 88a9700902
commit 3ff0b4a393
2 changed files with 13 additions and 12 deletions

View file

@ -33,8 +33,6 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)"
__cdist_myname=${0##*/};
__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
################################################################################
# Names / Constants
#
@ -84,10 +82,19 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
: ${__cdist_name_var_type:=__$__cdist_name_type}
################################################################################
# Tempfiles
#
__cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX")
__cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX")
################################################################################
# Local Base
#
: ${__cdist_conf_dir:=/etc/cdist}
: ${__cdist_local_base_dir:=$__cdist_tmp_dir}
: ${__cdist_conf_dir:="$(cd "$__cdist_abs_mydir/../conf" && pwd -P)"}
: ${__cdist_explorer_dir:=$__cdist_conf_dir/$__cdist_name_explorer}
: ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifest}
: ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init}
@ -96,7 +103,6 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
################################################################################
# Local output
#
: ${__cdist_local_base_dir:=$__cdist_tmp_dir}
: ${__cdist_out_dir:=$__cdist_local_base_dir/$__cdist_name_out_dir}
: ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer}
: ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object}
@ -106,9 +112,10 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
# Remote base
#
: ${__cdist_remote_base_dir:=/var/lib/cdist}
: ${__cdist_remote_bin_dir:=$__cdist_remote_base_dir/$__cdist_name_bin}
: ${__cdist_remote_conf_dir:=$__cdist_remote_base_dir/$__cdist_name_conf_dir}
: ${__cdist_remote_explorer_dir:=$__cdist_remote_conf_dir/$__cdist_name_explorer}
: ${__cdist_remote_bin_dir:=$__cdist_remote_conf_dir/$__cdist_name_bin}
: ${__cdist_remote_type_dir:=$__cdist_remote_conf_dir/$__cdist_name_type}
################################################################################
@ -118,12 +125,6 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
: ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer}
: ${__cdist_remote_out_object_base_dir:=$__cdist_remote_out_dir/$__cdist_name_object}
################################################################################
# Tempfiles
#
__cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX")
__cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX")
################################################################################
# Function list
#

View file

@ -34,7 +34,7 @@ __cdist_output_dir="$1"; shift
__cdist_work_dir="$__cdist_local_base_dir"
# Export information for cdist-type-emulator
export __cdist_output_dir __cdist_manifest
export __cdist_conf_dir __cdist_output_dir __cdist_manifest
# Export information for manifests
export __global="$__cdist_out_dir"