From 4e428c6844740783c2bfb518609bec893a049acb Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Wed, 12 Jun 2013 15:06:37 +0100 Subject: [PATCH] dib-run-parts was failing with empty targets. When the target directory is empty, the for loop printing our profile data was failing because of a glob problem. Change-Id: I34e612021c70d6b8f75423de0d8be969c52e58e2 --- elements/dib-run-parts/root.d/dib-run-parts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/dib-run-parts/root.d/dib-run-parts b/elements/dib-run-parts/root.d/dib-run-parts index 19ae213fe..1d31912c1 100644 --- a/elements/dib-run-parts/root.d/dib-run-parts +++ b/elements/dib-run-parts/root.d/dib-run-parts @@ -67,7 +67,7 @@ printf "%-40s %9s\n" Script Seconds printf "%-40s %9s\n" --------------------------------------- ---------- echo "" pushd $PROFILE_DIR > /dev/null -for target in start_* ; do +for target in $(find . -name 'start_*' -printf '%f\n') ; do stop_file=stop_${target##start_} start_seconds=$(cat $target) stop_seconds=$(cat $stop_file)