From: Christian Hofstaedtler Date: Thu, 21 Apr 2011 23:21:25 +0000 (+0200) Subject: run all commands with C locale X-Git-Tag: v0.4.2~3 X-Git-Url: http://git.grml.org/?p=grml-hwinfo.git;a=commitdiff_plain;h=9cc721d27207efefad5242bc9e9a187cd11c8e0f run all commands with C locale --- diff --git a/grml-hwinfo b/grml-hwinfo index cc50786..a379c86 100755 --- a/grml-hwinfo +++ b/grml-hwinfo @@ -16,6 +16,10 @@ PN="$(basename $0)" [ -n "$WORKING_DIR" -a -d "$WORKING_DIR" ] || WORKING_DIR=$(pwd) VERSION='0.4.1' +# data collection should not be affected by user locale +export LANG=C +export LC_ALL=C + TIMESTAMP='+%F--%H-%M-%S-%Z' DATE="$(date $TIMESTAMP)" @@ -229,7 +233,7 @@ else exectest hdparm && echo "hdparm -iv /dev/$disk :\n" >> hdparm && hdparm -iv /dev/$disk >> hdparm && echo "\n\n" >> hdparm exectest fdisk && echo "fdisk -lu /dev/$disk :\n" >> fdisk && fdisk -lu /dev/$disk >> fdisk 2>>fdisk.error && echo "\n\n" >> fdisk exectest parted && echo "parted -s /dev/$disk :\n" >> parted && parted -s /dev/$disk print >> parted && echo "\n\n" >> parted - LC_ALL=C file -s /dev/$disk?* | grep -v ": empty" >> file_disk + file -s /dev/$disk?* | grep -v ": empty" >> file_disk done fi )