From 4ac64013d53a80b5dd2952a35a2754d71666386f Mon Sep 17 00:00:00 2001 From: ISHIKAWA Mutsumi Date: Sun, 9 Nov 2008 16:19:01 +0900 Subject: Force to write trace file date with LANG=POSIX If locale environment variables (LANG, LC_ALL etc..) are set, new ftpsync script are write logs trace etc.. under this locales. But I think it is better force to write trace file (typicaly project/trace/HOSTNAME) with POSIX locale (or C) (not locale language environment). Mirror trace file will be used tracking mirror tree status. Trace file is mainly used to parse them by some programs, (mainly not for reading by a human) If date in the trace file is written with locale language environmet on each different host. It is too hard to perse them on each host (for example, trace file on ftp.jp.debian.org is written in Japanese, on ftp.kr.debian.org written in Korean, on ftp.de.debian.org written in German... It will be nightmare for tracing mirror tree) Signed-off-by: ISHIKAWA Mutsumi Signed-off-by: Joerg Jaspert --- bin/ftpsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/ftpsync') diff --git a/bin/ftpsync b/bin/ftpsync index fc8e6f3..ec06c7c 100755 --- a/bin/ftpsync +++ b/bin/ftpsync @@ -437,7 +437,7 @@ while [ -e "${UPDATEREQUIRED}" ]; do done if [ -d "`dirname "${TO}/${TRACE}"`" ]; then - date -u > "${TO}/${TRACE}" + LC_ALL=POSIX LANG=POSIX date -u > "${TO}/${TRACE}" echo "Used ftpsync version: ${VERSION}" >> "${TO}/${TRACE}" echo "Running on host: $(hostname -f)" >> "${TO}/${TRACE}" fi -- cgit v1.2.3