From dcb9900afc1beaca732a6309effe2be097adb68b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 00:30:37 +0100 Subject: [PATCH] submit variables to cdist-remote-explorer-run Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-all | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 341ef765..e38dc070 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -71,28 +71,29 @@ while read object; do done < "$object_listing" while [ $# -gt 0 ]; do - object="$1"; shift - object_id="$(__cdist_object_id_from_object "$object")" - type="$(__cdist_type_from_object "$object")" + __object="$1"; shift + __object_id="$(__cdist_object_id_from_object "$__object")" + __cdist_type="$(__cdist_type_from_object "$__object")" # Always copy object parameters (looks weired if done only for the ones with explorer) # Really always? # Check if type of object has >= 1 explorer - has_explorer="$(__cdist_type_has_explorer "$type")" + has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" # If so, run explorers on remote side if [ "$has_explorer" ]; then - echo "Running explorers for $object ..." - cdist-run-remote "$__cdist_target_host" \ - cdist-remote-explorer-run \ - "$__cdist_name_var_type_explorer" \ - "$(__cdist_remote_type_explorer_dir "$type")" \ - "$(__cdist_remote_object_type_explorer_dir "$object")" + echo "Running explorers for $__object ..." + cdist-run-remote "$__cdist_target_host" \ + "__object=\"$__object\" __object_id=\"$__object_id\"" \ + cdist-remote-explorer-run \ + "$__cdist_name_var_type_explorer" \ + "$(__cdist_remote_type_explorer_dir "$__cdist_type")" \ + "$(__cdist_remote_object_type_explorer_dir "$__object")" # Copy back results cdist-dir pull "$__cdist_target_host" \ - "$(__cdist_remote_object_type_explorer_dir "$object")" \ - "$(__cdist_object_type_explorer_dir "$object")" + "$(__cdist_remote_object_type_explorer_dir "$__object")" \ + "$(__cdist_object_type_explorer_dir "$__object")" fi done