diff --git a/conf/type/__file/gencode-local b/conf/type/__file/gencode-local index ae8625b5..0c6c249d 100755 --- a/conf/type/__file/gencode-local +++ b/conf/type/__file/gencode-local @@ -31,8 +31,6 @@ if [ -f "$__object/parameter/source" ]; then remote_cksum="$(cat "$__object/explorer/cksum")" if [ "$local_cksum" != "$remote_cksum" ]; then - # Export target_host so remote_copy script has access to it - echo "export __target_host=\"$__target_host\"" echo "$__remote_copy" "$source" "${__target_host}:${destination}" fi else diff --git a/lib/cdist/exec/remote.py b/lib/cdist/exec/remote.py index 433f4cbc..87db7273 100644 --- a/lib/cdist/exec/remote.py +++ b/lib/cdist/exec/remote.py @@ -91,7 +91,7 @@ class Remote(object): self.rmdir(destination) command = self._copy.split() command.extend(["-r", source, self.target_host + ":" + destination]) - self.run_command(command) + self._run_command(command) def run(self, command, env=None, return_output=False): """Run the given command with the given environment on the remote side. @@ -102,9 +102,9 @@ class Remote(object): cmd = self._exec.split() cmd.append(self.target_host) cmd.extend(command) - return self.run_command(cmd, env=env, return_output=return_output) + return self._run_command(cmd, env=env, return_output=return_output) - def run_command(self, command, env=None, return_output=False): + def _run_command(self, command, env=None, return_output=False): """Run the given command with the given environment. Return the output as a string.