aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-08-30 23:30:50 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-08-30 23:30:50 +0200
commitf00973ece9cf491f49c65048b653696d863627d6 (patch)
tree2aaa2f240e5da4f1d654026dd761f805554f20e9
parentgenkernel.conf: document zstd compression in comment (diff)
downloadgenkernel-f00973ec.tar.gz
genkernel-f00973ec.tar.bz2
genkernel-f00973ec.zip
gen_funcs.sh: check_disk_space_requirements(): Force LC_ALL=C
This should make parsing df output more stable in case non-English locales are used. Closes: https://github.com/gentoo/genkernel/pull/21 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rwxr-xr-xgen_funcs.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh
index ab7a7ce..72296e6 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -1853,7 +1853,7 @@ check_disk_space_requirements() {
gen_die "--check-free-disk-space-bootdir value '${CHECK_FREE_DISK_SPACE_BOOTDIR}' is not a valid number!"
fi
- available_free_disk_space=$(unset POSIXLY_CORRECT && df -BM "${BOOTDIR}" | awk '$3 ~ /[0-9]+/ { print $4 }')
+ available_free_disk_space=$(unset POSIXLY_CORRECT && LC_ALL="C" df -BM "${BOOTDIR}" | awk '$3 ~ /[0-9]+/ { print $4 }')
if [ -n "${available_free_disk_space}" ]
then
print_info 2 '' 1 0
@@ -1890,7 +1890,7 @@ check_disk_space_requirements() {
gen_die "--check-free-disk-space-kerneloutputdir value '${CHECK_FREE_DISK_SPACE_KERNELOUTPUTDIR}' is not a valid number!"
fi
- available_free_disk_space=$(unset POSIXLY_CORRECT && df -BM "${KERNEL_OUTPUTDIR}" | awk '$3 ~ /[0-9]+/ { print $4 }')
+ available_free_disk_space=$(unset POSIXLY_CORRECT && LC_ALL="C" df -BM "${KERNEL_OUTPUTDIR}" | awk '$3 ~ /[0-9]+/ { print $4 }')
if [ -n "${available_free_disk_space}" ]
then
print_info 2 '' 1 0