From a53782805dd9a811cbff53d340d1af47a717dc74 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 23 Jun 2011 12:13:46 +0200 Subject: [PATCH] ++log Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-06-21.execute_remote | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/dev/logs/2011-06-21.execute_remote b/doc/dev/logs/2011-06-21.execute_remote index 61292688..a9c88df2 100644 --- a/doc/dev/logs/2011-06-21.execute_remote +++ b/doc/dev/logs/2011-06-21.execute_remote @@ -12,12 +12,19 @@ Solutions: echo $function $args ) | ssh foo + Works partly, does not work for export = ... + Needs to copy over lib every time again! + 2) scp $dir/lib.sh root@foo:/tmp/lib.sh cat << DONE | ssh root@foo sh source /tmp/lib.sh + export foo=bla + function args DONE + Caches lib directory + 3) follow up to 1) __run_remote() { @@ -28,6 +35,22 @@ Solutions: eof + 4) final solution + - write for every remote job a new function + - this functions prepares env + reuses ssh header + + __cdist_remote_explorer() + { + cat << eof + $__cdist_remote_header + export foo1=bar + export foo2=bar + export foo3=bar + + "$@" + eof | __cdist_ssh + } + Problems found and solved: