From d05f11b0b8636fe4eb1e658dbb4380553ca48808 Mon Sep 17 00:00:00 2001
From: Steven Armstrong <steven@icarus.ethz.ch>
Date: Fri, 10 Jul 2015 16:39:27 +0200
Subject: [PATCH] deal with that stinkin cdist marker thinggy

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
---
 cdist/conf/type/__install_mount/gencode-remote | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/cdist/conf/type/__install_mount/gencode-remote b/cdist/conf/type/__install_mount/gencode-remote
index 3a35c139..ea5d260b 100755
--- a/cdist/conf/type/__install_mount/gencode-remote
+++ b/cdist/conf/type/__install_mount/gencode-remote
@@ -20,7 +20,7 @@
 
 get_type_from_mkfs() {
    _device="$1"
-   for mkfs_object in $(find "$__global/object/__install_mkfs" -path "*.cdist"); do
+   for mkfs_object in $(find "$__global/object/__install_mkfs" -type d -name "$__cdist_object_marker"); do
       mkfs_device="$(cat "$mkfs_object/parameter/device")"
       if [ "$_device" = "$mkfs_device" ]; then
          cat "$mkfs_object/parameter/type"
@@ -42,7 +42,10 @@ else
    # store for later use by others
    echo "$type" > "$__object/parameter/type"
 fi
-[ -n "$type" ] || die "Can't determine type for $__object"
+[ -n "$type" ] || {
+   echo "Can't determine type for $__object" >&2
+   exit 1
+}
 if [ "$type" = "swap" ]; then
    echo "swapon \"$device\""
 else