summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Tollerton <rich.tollerton@ni.com>2014-07-23 17:29:28 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-25 15:33:33 +0100
commita69c3ba99be1502c50d3d1eb9ff66f135884ed76 (patch)
tree5964f63c5f5e12a532801991e25584d5a745e9c0 /meta
parentfb32cd7abac268747347ee5cff98a4d07dc4b780 (diff)
downloadopenembedded-core-a69c3ba99be1502c50d3d1eb9ff66f135884ed76.tar.gz
openembedded-core-a69c3ba99be1502c50d3d1eb9ff66f135884ed76.tar.bz2
openembedded-core-a69c3ba99be1502c50d3d1eb9ff66f135884ed76.zip
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. 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>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/base-files/base-files/profile2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index 8eeaac3693..0b2d9d79e5 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -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