integrate bin/cdist-explorer-coordinator into cdist-explorer-run

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-22 21:18:43 +01:00
parent dfca442267
commit 3a015dc39a
2 changed files with 6 additions and 36 deletions

View file

@ -1,36 +0,0 @@
#!/bin/sh
#
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
#
# This file is part of cdist.
#
# cdist is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cdist is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
#
#
# Coordinate run of explorers on target (this script runs on the target)
#
. cdist-config
[ $# -eq 2 ] || __cdist_usage "<explorer dir> <result dir>"
set -e
explorer_dir="$1"; shift
result_dir="$1"; shift
cd "${explorer_dir}"
for explorer in *; do
"./$explorer" > "${result_dir}/${explorer}"
done

View file

@ -46,6 +46,12 @@ ssh "${__cdist_remote_user}@${__cdist_target_host}" \
# Copy explorers to remote source directory
# FIXME: enable -q as soon as the code is cleaned up
cd "${explorer_dir}"
for explorer in *; do
"./$explorer" > "${result_dir}/${explorer}"
done
scp "${__cdist_src_dir}"/* \
"${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}"