base-files: Don't export TZ if /etc/TZ exists

While glibc/eglibc looks for the time zone in /etc/localtime, other libc
alternatives (e.g. uclibc) may look for it in /etc/TZ.  If /etc/TZ
exists, don't fall back to setting TZ to "UTC" in /etc/profile.

(From OE-Core rev: a69c3ba99be1502c50d3d1eb9ff66f135884ed76)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Tollerton 2014-07-23 17:29:28 -05:00 committed by Richard Purdie
parent 35f3f10001
commit e2bd60a50c
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ PATH="/usr/local/bin:/usr/bin:/bin"
EDITOR="/bin/vi" # needed for packages like cron
test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
if [ ! -e /etc/localtime ]; then
if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
# for an explanation of how to set this to your local timezone.
export TZ