From 8ed645f0469182b46d5eaa036a7eebdaae6406ee Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Tue, 1 Jul 2014 10:47:00 +0200 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. Change-Id: Ia68853505485fefbf0890313456e7edb6097666b Closes-Bug: #1335932 --- elements/dib-run-parts/bin/dib-run-parts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/dib-run-parts/bin/dib-run-parts b/elements/dib-run-parts/bin/dib-run-parts index c98b853d..1aed34b2 100755 --- a/elements/dib-run-parts/bin/dib-run-parts +++ b/elements/dib-run-parts/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_NUMERIC=C LC_ALL=C printf "%-40s %10.3f\n" ${target##start_} $duration done popd > /dev/null rm -rf $PROFILE_DIR