From dade7ef1aa9d1caf5988770c1510f3e236d20cb3 Mon Sep 17 00:00:00 2001 From: Alexis Lee Date: Tue, 8 Jul 2014 15:12:36 +0100 Subject: [PATCH] Set LC_ALL=C into dib-run-parts env Force LC_ALL to C to allow printf to work independently from the locale. Gives invalid number error if run in non-english locale. Port to dib-utils of: Ia68853505485fefbf0890313456e7edb6097666b Change-Id: Ibbfa7a4a91dca72b16bb8fcb9602b71eccf54008 --- bin/dib-run-parts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/dib-run-parts b/bin/dib-run-parts index 50ff8dc..3df3fd4 100755 --- a/bin/dib-run-parts +++ b/bin/dib-run-parts @@ -101,7 +101,7 @@ for target in $(find . -name 'start_*' -printf '%f\n') ; do start_seconds=$(cat $target) stop_seconds=$(cat $stop_file) duration=$(python -c "print($stop_seconds - $start_seconds)") - LC_NUMERIC=C printf "%-40s %10.3f\n" ${target##start_} $duration + LC_ALL=C printf "%-40s %10.3f\n" ${target##start_} $duration done popd > /dev/null rm -rf $PROFILE_DIR