strip one parameter from cdist-bin-transfer
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
5b82a0fcda
commit
96c9ecf6fe
2 changed files with 5 additions and 6 deletions
|
@ -22,11 +22,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. cdist-config
|
. cdist-config
|
||||||
[ $# -eq 2 ] || __cdist_usage "<target host> <remote bin dir>"
|
[ $# -eq 1 ] || __cdist_usage "<target host>"
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
__cdist_target_host="$1"; shift
|
__cdist_target_host="$1"; shift
|
||||||
__cdist_my_remote_out_dir="$1"; shift
|
|
||||||
|
|
||||||
# Find directory that contains cdist binaries
|
# Find directory that contains cdist binaries
|
||||||
__cdist_conf_dir_path=$(which cdist-config)
|
__cdist_conf_dir_path=$(which cdist-config)
|
||||||
|
@ -37,15 +36,15 @@ echo "Transferring cdist binaries ..."
|
||||||
|
|
||||||
# re-create basedir so it's clean
|
# re-create basedir so it's clean
|
||||||
ssh "${__cdist_remote_user}@${__cdist_target_host}" \
|
ssh "${__cdist_remote_user}@${__cdist_target_host}" \
|
||||||
"rm -rf \"${__cdist_my_remote_out_dir}\" && mkdir -p \"${__cdist_my_remote_out_dir}\""
|
"rm -rf \"${__cdist_remote_bin_dir}\" && mkdir -p \"${__cdist_remote_bin_dir}\""
|
||||||
|
|
||||||
# Transfer cdist-* to the remote host
|
# Transfer cdist-* to the remote host
|
||||||
scp -qr "${__cdist_src_base}"* \
|
scp -qr "${__cdist_src_base}"* \
|
||||||
"${__cdist_remote_user}@${__cdist_target_host}:${__cdist_my_remote_out_dir}"
|
"${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_bin_dir}"
|
||||||
|
|
||||||
# Adjust cdist-config to contain static version string
|
# Adjust cdist-config to contain static version string
|
||||||
tmp_version="$__cdist_version"
|
tmp_version="$__cdist_version"
|
||||||
sed "s/^: \${\(__cdist_version\):=.*/\1=\"$tmp_version\"/" "$(which cdist-config)" | \
|
sed "s/^: \${\(__cdist_version\):=.*/\1=\"$tmp_version\"/" "$(which cdist-config)" | \
|
||||||
ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \
|
ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \
|
||||||
"cat > \"${__cdist_my_remote_out_dir}\"/cdist-config"
|
"cat > \"${__cdist_remote_bin_dir}\"/cdist-config"
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ echo "cdist $__cdist_version: Configuring $__cdist_target_host"
|
||||||
__cdist_init_deploy "$__cdist_target_host"
|
__cdist_init_deploy "$__cdist_target_host"
|
||||||
|
|
||||||
# Transfer cdist "binaries"
|
# Transfer cdist "binaries"
|
||||||
cdist-bin-transfer "$__cdist_target_host" "$__cdist_remote_bin_dir"
|
cdist-bin-transfer "$__cdist_target_host"
|
||||||
|
|
||||||
# Execute general explorers
|
# Execute general explorers
|
||||||
cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir"
|
cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir"
|
||||||
|
|
Loading…
Reference in a new issue