From 174fb3b7c807e1c422100e1e2b11aabac8fab86b Mon Sep 17 00:00:00 2001
From: Nico Schottelius <nico@feder.schottelius.org>
Date: Mon, 19 Jun 2017 11:04:28 +0200
Subject: [PATCH] backport __install_partition_msdos_apply from Steven

Signed-off-by: Nico Schottelius <nico@feder.schottelius.org>
---
 .../conf/type/__install_partition_msdos_apply/gencode-remote  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cdist/conf/type/__install_partition_msdos_apply/gencode-remote b/cdist/conf/type/__install_partition_msdos_apply/gencode-remote
index a1547296..60f2fd1e 100755
--- a/cdist/conf/type/__install_partition_msdos_apply/gencode-remote
+++ b/cdist/conf/type/__install_partition_msdos_apply/gencode-remote
@@ -18,6 +18,8 @@
 # along with cdist. If not, see <http://www.gnu.org/licenses/>.
 #
 
+#set -x
+
 die() {
    echo "[__install_partition_msdos_apply] $@" >&2
    exit 1
@@ -57,7 +59,7 @@ size_to_mb() {
 
 get_objects() {
    objects_file=$(mktemp)
-   for object in $(find "$__global/object/__install_partition_msdos" -path "*.cdist"); do
+   for object in $(find "$__global/object/__install_partition_msdos" -type d -name "$__cdist_object_marker"); do
       object_device="$(cat "$object/parameter/device")"
       object_minor="$(cat "$object/parameter/minor")"
       echo "$object_device $object_minor $object" >> $objects_file