From f58f1c91e4a93a77dfd18b9f37bea77422dd4360 Mon Sep 17 00:00:00 2001
From: Nico Schottelius <nico@kr.ethz.ch>
Date: Wed, 23 Feb 2011 18:24:51 +0100
Subject: [PATCH] write to explorer name

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
---
 bin/cdist-remote-explorer-run | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run
index 5dbea39c..26708101 100755
--- a/bin/cdist-remote-explorer-run
+++ b/bin/cdist-remote-explorer-run
@@ -47,6 +47,8 @@ fi
 
 # Execute all explorers
 for explorer in "$__cdist_explorer_dir/"*; do
+   explorer_name="${explorer##*/}"
+
    if [ -f "$explorer" ]; then
       if [ ! -x "$explorer" ]; then
          echo "Explorer \"$explorer\" exists, but is not executable."
@@ -54,7 +56,7 @@ for explorer in "$__cdist_explorer_dir/"*; do
       fi
 
       # Execute explorers and save results in remote destination directory
-      "$explorer" "$@" > "${__cdist_my_out_dir}"
+      "$explorer" "$@" > "${__cdist_my_out_dir}/$explorer_name"
    else
       if [ -e "$explorer" ]; then
          echo "Explorer \"$explorer\" exists, but is not a file."